Patch for an Issue #1121

This commit is contained in:
Miroslav Stampar 2015-01-19 09:17:16 +01:00
parent e73ac6c8e3
commit 393659ffbf
2 changed files with 7 additions and 3 deletions

View File

@ -213,6 +213,9 @@ class Web:
if success: if success:
break break
if not directory:
continue
uploaded = False uploaded = False
directory = ntToPosixSlashes(normalizePath(directory)) directory = ntToPosixSlashes(normalizePath(directory))

View File

@ -81,6 +81,7 @@ class MultipartPostHandler(urllib2.BaseHandler):
buf = '' buf = ''
for (key, value) in vars: for (key, value) in vars:
if key is not None and value is not None:
buf += '--%s\r\n' % boundary buf += '--%s\r\n' % boundary
buf += 'Content-Disposition: form-data; name="%s"' % key buf += 'Content-Disposition: form-data; name="%s"' % key
buf += '\r\n\r\n' + value + '\r\n' buf += '\r\n\r\n' + value + '\r\n'