Kaydet (Commit) 1e991f2d authored tarafından Senthil Kumaran's avatar Senthil Kumaran

Fix some mistakes- Issue3243 (r87399) Correcting the operator precendence

problem with Content-Length header and uncommenting the test.
üst c44befb8
......@@ -775,7 +775,7 @@ class HTTPConnection:
for d in data:
self.sock.sendall(d)
else:
raise TypeError("data should be byte-like object\
raise TypeError("data should be a bytes-like object\
or an iterable, got %r " % type(it))
def _output(self, s):
......
......@@ -839,7 +839,6 @@ class HandlerTests(unittest.TestCase):
# A file object
"""
file_obj = io.StringIO()
file_obj.write("Something\nSomething\nSomething\n")
......@@ -863,7 +862,6 @@ class HandlerTests(unittest.TestCase):
req = Request("http://example.com/", iterable_array, headers)
newreq = h.do_request_(req)
self.assertEqual(int(newreq.get_header('Content-length')),16)
"""
def test_http_doubleslash(self):
......
......@@ -1062,7 +1062,7 @@ class AbstractHTTPHandler(BaseHandler):
data))
else:
request.add_unredirected_header(
'Content-length', '%d' % len(mv) * mv.itemsize)
'Content-length', '%d' % (len(mv) * mv.itemsize))
sel_host = host
if request.has_proxy():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment