(self, request)
| 452 | return request |
| 453 | |
| 454 | def _modify_request_before_signing(self, request): |
| 455 | if 'Authorization' in request.headers: |
| 456 | del request.headers['Authorization'] |
| 457 | self._set_necessary_date_headers(request) |
| 458 | if self.credentials.token: |
| 459 | if 'X-Amz-Security-Token' in request.headers: |
| 460 | del request.headers['X-Amz-Security-Token'] |
| 461 | request.headers['X-Amz-Security-Token'] = self.credentials.token |
| 462 | |
| 463 | if not request.context.get('payload_signing_enabled', True): |
| 464 | if 'X-Amz-Content-SHA256' in request.headers: |
| 465 | del request.headers['X-Amz-Content-SHA256'] |
| 466 | request.headers['X-Amz-Content-SHA256'] = UNSIGNED_PAYLOAD |
| 467 | |
| 468 | def _set_necessary_date_headers(self, request): |
| 469 | # The spec allows for either the Date _or_ the X-Amz-Date value to be |
no test coverage detected