equal
deleted
inserted
replaced
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')) |