Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <forenjunkie@chello.at>2017-08-17 22:52:38 +0300
committerPhilipp Hörist <forenjunkie@chello.at>2017-08-17 22:52:38 +0300
commit01a8fbf99e91416d8b5b969cb25652428d3df976 (patch)
tree89ba1b2504db8464d6b6c8f7188eaf9ca695ce35
parent3c0946774bb72403060d2a6f09f3b87ad832ae95 (diff)
[httpupload] Send content-length in header
-rw-r--r--httpupload/httpupload.py3
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...")