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

Skip to content

Commit 73ececd

Browse files
committed
added that "default" "Connection: keep-alive" header
1 parent cd0fe8d commit 73ececd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

extra/keepalive/keepalive.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ def _start_connection(self, h, req):
128128
else:
129129
h.putrequest('GET', req.get_selector())
130130

131+
if not req.headers.has_key('Connection'):
132+
h.putheader('Connection', 'keep-alive')
133+
131134
for args in self.parent.addheaders:
132135
h.putheader(*args)
133136
for k, v in req.headers.items():

0 commit comments

Comments
 (0)