1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-26 06:46:13 +01:00

fix issue with uploading files -- in PUT requests, there was an additional newline inserted, which could lead to wrong interpretation of the payload if e.g. an intercepting web proxy was in between osc and the api server

This commit is contained in:
Dr. Peter Poeml 2006-07-19 15:15:57 +00:00
parent c52baf09f7
commit 5be1e292fc

View File

@ -21,7 +21,7 @@ BLOCKSIZE=1024
def delfile(url, file, username, password):
auth_string = base64.encodestring('%s:%s' % (username, password))
auth_string = base64.encodestring('%s:%s' % (username, password)).strip()
u = urlparse.urlparse(url)
host = u[1]
@ -47,7 +47,7 @@ def putfile(url, file, username, password):
size = os.stat(file)[6]
auth_string = base64.encodestring('%s:%s' % (username, password))
auth_string = base64.encodestring('%s:%s' % (username, password)).strip()
u = urlparse.urlparse(url)
host = u[1]