Show More
@@ -63,6 +63,8 b' def normalize(form):' | |||
|
63 | 63 | class parsedrequest(object): |
|
64 | 64 | """Represents a parsed WSGI request / static HTTP request parameters.""" |
|
65 | 65 | |
|
66 | # Request method. | |
|
67 | method = attr.ib() | |
|
66 | 68 | # Full URL for this request. |
|
67 | 69 | url = attr.ib() |
|
68 | 70 | # URL without any path components. Just <proto>://<host><port>. |
@@ -207,7 +209,8 b' def parserequestfromenv(env):' | |||
|
207 | 209 | if 'CONTENT_LENGTH' in env and 'HTTP_CONTENT_LENGTH' not in env: |
|
208 | 210 | headers['Content-Length'] = env['CONTENT_LENGTH'] |
|
209 | 211 | |
|
210 | return parsedrequest(url=fullurl, baseurl=baseurl, | |
|
212 | return parsedrequest(method=env['REQUEST_METHOD'], | |
|
213 | url=fullurl, baseurl=baseurl, | |
|
211 | 214 | advertisedurl=advertisedfullurl, |
|
212 | 215 | advertisedbaseurl=advertisedbaseurl, |
|
213 | 216 | apppath=apppath, |
@@ -324,7 +324,7 b' def _handlehttperror(e, wsgireq, req, cm' | |||
|
324 | 324 | # the HTTP response. In other words, it helps prevent deadlocks |
|
325 | 325 | # on clients using httplib. |
|
326 | 326 | |
|
327 |
if ( |
|
|
327 | if (req.method == 'POST' and | |
|
328 | 328 | # But not if Expect: 100-continue is being used. |
|
329 | 329 | (req.headers.get('Expect', '').lower() != '100-continue')): |
|
330 | 330 | wsgireq.drain() |
General Comments 0
You need to be logged in to leave comments.
Login now