diff options
author | Philipp Hörist <forenjunkie@chello.at> | 2017-08-17 22:52:38 +0300 |
---|---|---|
committer | Philipp Hörist <forenjunkie@chello.at> | 2017-08-17 22:52:38 +0300 |
commit | 01a8fbf99e91416d8b5b969cb25652428d3df976 (patch) | |
tree | 89ba1b2504db8464d6b6c8f7188eaf9ca695ce35 | |
parent | 3c0946774bb72403060d2a6f09f3b87ad832ae95 (diff) |
[httpupload] Send content-length in header
-rw-r--r-- | httpupload/httpupload.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/httpupload/httpupload.py b/httpupload/httpupload.py index da4c3ad..9c2e8b8 100644 --- a/httpupload/httpupload.py +++ b/httpupload/httpupload.py @@ -302,7 +302,8 @@ class Base(object): _('Uploading file via HTTP...')) try: headers = {'User-Agent': 'Gajim %s' % gajim.version, - 'Content-Type': file.mime} + 'Content-Type': file.mime, + 'Content-Length': file.size} request = Request( file.put, data=file.stream, headers=headers, method='PUT') log.info("Opening Urllib upload request...") |