Show More
@@ -318,15 +318,15 b' class KeepAliveHandler(object):' | |||||
318 | headers.update(sorted(req.unredirected_hdrs.items())) |
|
318 | headers.update(sorted(req.unredirected_hdrs.items())) | |
319 | headers = util.sortdict((n.lower(), v) for n, v in headers.items()) |
|
319 | headers = util.sortdict((n.lower(), v) for n, v in headers.items()) | |
320 | skipheaders = {} |
|
320 | skipheaders = {} | |
321 | for n in ('host', 'accept-encoding'): |
|
321 | for n in (r'host', r'accept-encoding'): | |
322 | if n in headers: |
|
322 | if n in headers: | |
323 | skipheaders['skip_' + n.replace('-', '_')] = 1 |
|
323 | skipheaders[r'skip_' + n.replace(r'-', r'_')] = 1 | |
324 | try: |
|
324 | try: | |
325 | if urllibcompat.hasdata(req): |
|
325 | if urllibcompat.hasdata(req): | |
326 | data = urllibcompat.getdata(req) |
|
326 | data = urllibcompat.getdata(req) | |
327 | h.putrequest( |
|
327 | h.putrequest( | |
328 | req.get_method(), urllibcompat.getselector(req), |
|
328 | req.get_method(), urllibcompat.getselector(req), | |
329 |
|
|
329 | skipheaders) | |
330 | if r'content-type' not in headers: |
|
330 | if r'content-type' not in headers: | |
331 | h.putheader(r'Content-type', |
|
331 | h.putheader(r'Content-type', | |
332 | r'application/x-www-form-urlencoded') |
|
332 | r'application/x-www-form-urlencoded') | |
@@ -335,7 +335,7 b' class KeepAliveHandler(object):' | |||||
335 | else: |
|
335 | else: | |
336 | h.putrequest( |
|
336 | h.putrequest( | |
337 | req.get_method(), urllibcompat.getselector(req), |
|
337 | req.get_method(), urllibcompat.getselector(req), | |
338 |
|
|
338 | skipheaders) | |
339 | except socket.error as err: |
|
339 | except socket.error as err: | |
340 | raise urlerr.urlerror(err) |
|
340 | raise urlerr.urlerror(err) | |
341 | for k, v in headers.items(): |
|
341 | for k, v in headers.items(): |
General Comments 0
You need to be logged in to leave comments.
Login now