Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1f5224f

Browse files
committed
update
1 parent 788eb8f commit 1f5224f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

extra/keepalive/keepalive.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,14 @@ def _start_connection(self, h, req):
122122
data = req.get_data()
123123
h.putrequest('POST', req.get_selector())
124124
if not req.headers.has_key('Content-type'):
125-
h.putheader('Content-type', 'application/x-www-form-urlencoded')
125+
req.headers['Content-type'] = 'application/x-www-form-urlencoded'
126126
if not req.headers.has_key('Content-length'):
127-
h.putheader('Content-length', '%d' % len(data))
127+
req.headers['Content-length'] = '%d' % len(data)
128128
else:
129129
h.putrequest('GET', req.get_selector())
130130

131131
if not req.headers.has_key('Connection'):
132-
h.putheader('Connection', 'keep-alive')
132+
req.headers['Connection'] = 'keep-alive'
133133

134134
for args in self.parent.addheaders:
135135
h.putheader(*args)

0 commit comments

Comments
 (0)