mercurial/wireprotoserver.py
changeset 36854 16292bbda39c
parent 36853 ed0456fde625
child 36855 0bc771bba220
equal deleted inserted replaced
36853:ed0456fde625 36854:16292bbda39c
   322     # we always read HTTP request data from the client, thus
   322     # we always read HTTP request data from the client, thus
   323     # ensuring httplib transitions to a state that allows it to read
   323     # ensuring httplib transitions to a state that allows it to read
   324     # the HTTP response. In other words, it helps prevent deadlocks
   324     # the HTTP response. In other words, it helps prevent deadlocks
   325     # on clients using httplib.
   325     # on clients using httplib.
   326 
   326 
   327     if (wsgireq.env[r'REQUEST_METHOD'] == r'POST' and
   327     if (req.method == 'POST' and
   328         # But not if Expect: 100-continue is being used.
   328         # But not if Expect: 100-continue is being used.
   329         (req.headers.get('Expect', '').lower() != '100-continue')):
   329         (req.headers.get('Expect', '').lower() != '100-continue')):
   330         wsgireq.drain()
   330         wsgireq.drain()
   331     else:
   331     else:
   332         wsgireq.headers.append((r'Connection', r'Close'))
   332         wsgireq.headers.append((r'Connection', r'Close'))