Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(15)

Unified Diff: Lib/test/test_urllib2.py

Issue 17485: Deleting Request data does not update Content-length header.
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Lib/urllib/request.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_urllib2.py Tue Mar 19 12:18:50 2013 -0700
+++ b/Lib/test/test_urllib2.py Tue Mar 19 13:20:52 2013 -0700
@@ -1443,6 +1443,12 @@
self.assertEqual(b"1234567890", request.data)
self.assertEqual("10", request.get_header("Content-length"))
+ del request.data
+ opener.open(request)
+
+ self.assertEqual(None, request.data)
+ self.assertEqual(None, request.get_header("Content-length"))
+
def test_HTTPError_interface(self):
"""
Issue 13211 reveals that HTTPError didn't implement the URLError
« no previous file with comments | « no previous file | Lib/urllib/request.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+