summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-09-28 15:01:11 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-09-28 15:01:11 (GMT)
commit623ae294694dcf11eced4a9d24abf66a571a9d04 (patch)
tree9edc16ebe79e2c044b8ed41de24e3fae8a156e2b /Lib
parent9c1dba2758fc601f6c4d7fe2aeb62272ffd688a8 (diff)
downloadcpython-623ae294694dcf11eced4a9d24abf66a571a9d04.zip
cpython-623ae294694dcf11eced4a9d24abf66a571a9d04.tar.gz
cpython-623ae294694dcf11eced4a9d24abf66a571a9d04.tar.bz2
#10510: Fix bug in forward port of 2.7 distutils patch.
Pointed out by Arfrever.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/command/upload.py1
-rw-r--r--Lib/distutils/tests/test_upload.py2
2 files changed, 1 insertions, 2 deletions
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py
index 9b15b67..1a96e22 100644
--- a/Lib/distutils/command/upload.py
+++ b/Lib/distutils/command/upload.py
@@ -164,7 +164,6 @@ class upload(PyPIRCCommand):
if value and value[-1:] == b'\r':
body.write(b'\n') # write an extra newline (lurve Macs)
body.write(end_boundary)
- body.write(b"\r\n")
body = body.getvalue()
self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO)
diff --git a/Lib/distutils/tests/test_upload.py b/Lib/distutils/tests/test_upload.py
index 2401541..dccaf77 100644
--- a/Lib/distutils/tests/test_upload.py
+++ b/Lib/distutils/tests/test_upload.py
@@ -127,7 +127,7 @@ class uploadTestCase(PyPIRCCommandTestCase):
# what did we send ?
headers = dict(self.last_open.req.headers)
- self.assertEqual(headers['Content-length'], '2163')
+ self.assertEqual(headers['Content-length'], '2161')
content_type = headers['Content-type']
self.assertTrue(content_type.startswith('multipart/form-data'))
self.assertEqual(self.last_open.req.get_method(), 'POST')