We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
our code that was exhibiting the problem
return sendfile(request, remote_agent_installer, attachment=True, attachment_filename=filename, mimetype='application/octet-stream', add_encoding_header=False)
our work around: we added another param to not add content encoding.
Python27/Lib/site-packages/sendfile/init.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Python27/Lib/site-packages/sendfile/init.py b/Python27/Lib/site-packages/sendfile/init.py index da16a83..eaa0157 100644 --- a/Python27/Lib/site-packages/sendfile/init.py +++ b/Python27/Lib/site-packages/sendfile/init.py @@ -32,7 +32,7 @@ def _get_sendfile():
-def sendfile(request, filename, attachment=False, attachment_filename=None, mimetype=None, encoding=None): +def sendfile(request, filename, attachment=False, attachment_filename=None, mimetype=None, encoding=None, add_encoding_header=True): ''' create a response to send file using backend configured in SENDFILE_BACKEND
@@ -86,7 +86,7 @@ def sendfile(request, filename, attachment=False, attachment_filename=None, mime response['Content-Type'] = mimetype if not encoding: encoding = guessed_encoding
return response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
our code that was exhibiting the problem
return sendfile(request, remote_agent_installer, attachment=True, attachment_filename=filename, mimetype='application/octet-stream', add_encoding_header=False)
our work around:
we added another param to not add content encoding.
Python27/Lib/site-packages/sendfile/init.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Python27/Lib/site-packages/sendfile/init.py b/Python27/Lib/site-packages/sendfile/init.py
index da16a83..eaa0157 100644
--- a/Python27/Lib/site-packages/sendfile/init.py
+++ b/Python27/Lib/site-packages/sendfile/init.py
@@ -32,7 +32,7 @@ def _get_sendfile():
-def sendfile(request, filename, attachment=False, attachment_filename=None, mimetype=None, encoding=None):
+def sendfile(request, filename, attachment=False, attachment_filename=None, mimetype=None, encoding=None, add_encoding_header=True):
'''
create a response to send file using backend configured in SENDFILE_BACKEND
@@ -86,7 +86,7 @@ def sendfile(request, filename, attachment=False, attachment_filename=None, mime
response['Content-Type'] = mimetype
if not encoding:
encoding = guessed_encoding
response['Content-Encoding'] = encoding
return response
The text was updated successfully, but these errors were encountered: