mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
fix proxy adding the Content-Length header twice
This commit is contained in:
parent
8fe6a030ef
commit
2c9c719c9e
@ -4946,6 +4946,10 @@ def streamfile(url, http_meth = http_GET, bufsize=8192, data=None, progress_obj=
|
|||||||
cl = f.info().get('Content-Length')
|
cl = f.info().get('Content-Length')
|
||||||
|
|
||||||
if cl is not None:
|
if cl is not None:
|
||||||
|
# sometimes the proxy adds the same header again
|
||||||
|
# which yields in value like '3495, 3495'
|
||||||
|
# use the first of these values (should be all the same)
|
||||||
|
cl = cl.split(',')[0]
|
||||||
cl = int(cl)
|
cl = int(cl)
|
||||||
|
|
||||||
if progress_obj:
|
if progress_obj:
|
||||||
|
Loading…
Reference in New Issue
Block a user