summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/upload.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/command/upload.py')
-rw-r--r--Lib/distutils/command/upload.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py
index 9aa54ee..b773f47 100644
--- a/Lib/distutils/command/upload.py
+++ b/Lib/distutils/command/upload.py
@@ -136,8 +136,8 @@ class upload(PyPIRCCommand):
# Build up the MIME payload for the POST data
boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
- sep_boundary = '\n--' + boundary
- end_boundary = sep_boundary + '--'
+ sep_boundary = '\r\n--' + boundary
+ end_boundary = sep_boundary + '--\r\n'
body = StringIO.StringIO()
for key, value in data.items():
# handle multiple entries for the same name
@@ -151,14 +151,13 @@ class upload(PyPIRCCommand):
fn = ""
body.write(sep_boundary)
- body.write('\nContent-Disposition: form-data; name="%s"'%key)
+ body.write('\r\nContent-Disposition: form-data; name="%s"' % key)
body.write(fn)
- body.write("\n\n")
+ body.write("\r\n\r\n")
body.write(value)
if value and value[-1] == '\r':
body.write('\n') # write an extra newline (lurve Macs)
body.write(end_boundary)
- body.write("\n")
body = body.getvalue()
self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO)