When generating a pre-signed URL for download and specifying response-content-disposition to set a target filename, the actual download does not contain the Content-Disposition header therefore the download file does not have the requested filename.

I have confirmed that this works corrected in S3 itself.

I'd be happy to explore a fix if anyone can point me in the right direction/location.
response_content_str = None
            try:
                response_content_str = to_str(response._content)
            except Exception:
                pass
            
            
            
            
            if response_content_str and response_content_str.startswith('<'):
                is_bytes = isinstance(response._content, six.binary_type)
                append_last_modified_headers(response=response, content=response_content_str)
                
                response._content = re.sub(r'([^\?])>\n\s*<', r'\1><', response_content_str, flags=re.MULTILINE)
                
                response._content = self._update_location(response._content, bucket_name)
                
                if is_bytes:
                    response._content = to_bytes(response._content)
                
                
                if 'text/html' in response.headers.get('Content-Type', ''):
                    response.headers['Content-Type'] = 'application/xml; charset=utf-8'
                reset_content_length = True
            
            if method == 'DELETE':
                reset_content_length = True
            if reset_content_length:
                response.headers['content-length'] = len(response._content)
    def _update_location(self, content, bucket_name):