MCPcopy Create free account
hub / github.com/aws/aws-cli / headers_to_sign

Method headers_to_sign

awscli/botocore/auth.py:242–256  ·  view source on GitHub ↗

Select the headers from the request that need to be included in the StringToSign.

(self, request)

Source from the content-addressed store, hash-verified

240 return sig
241
242 def headers_to_sign(self, request):
243 """
244 Select the headers from the request that need to be included
245 in the StringToSign.
246 """
247 header_map = HTTPHeaders()
248 for name, value in request.headers.items():
249 lname = name.lower()
250 if lname not in SIGNED_HEADERS_BLACKLIST:
251 header_map[lname] = value
252 if 'host' not in header_map:
253 # TODO: We should set the host ourselves, instead of relying on our
254 # HTTP client to set it for us.
255 header_map['host'] = _host_from_url(request.url)
256 return header_map
257
258 def canonical_query_string(self, request):
259 # The query string can come from two parts. One is the

Calls 2

HTTPHeadersClass · 0.90
_host_from_urlFunction · 0.85