Fixed host header not included in S3 requests sometimes.

This commit is contained in:
acsbendi 2019-07-26 19:50:24 +02:00
parent 3e1e273380
commit 290f8f9fd5

View File

@ -727,6 +727,8 @@ class ResponseObject(_TemplateEnvironmentMixin, ActionAuthenticatorMixin):
self.method = request.method
self.path = self._get_path(request)
self.headers = request.headers
if 'host' not in self.headers:
self.headers['host'] = urlparse(full_url).netloc
response_headers = {}
try:
response = self._key_response(request, full_url, headers)