equal
deleted
inserted
replaced
326 def requestReceived(self, command, path, version): |
326 def requestReceived(self, command, path, version): |
327 """Called by channel when all data has been received. |
327 """Called by channel when all data has been received. |
328 |
328 |
329 This method is not intended for users. |
329 This method is not intended for users. |
330 """ |
330 """ |
331 self.content.seek(0,0) |
331 self.content.seek(0, 0) |
332 self.args = {} |
332 self.args = {} |
333 self.files = {} |
333 self.files = {} |
334 self.stack = [] |
334 self.stack = [] |
335 self.method, self.uri = command, path |
335 self.method, self.uri = command, path |
336 self.clientproto = version |
336 self.clientproto = version |
349 if self.method == "POST" and ctype: |
349 if self.method == "POST" and ctype: |
350 key, pdict = parse_header(ctype) |
350 key, pdict = parse_header(ctype) |
351 if key == 'application/x-www-form-urlencoded': |
351 if key == 'application/x-www-form-urlencoded': |
352 self.args.update(http.parse_qs(self.content.read(), 1)) |
352 self.args.update(http.parse_qs(self.content.read(), 1)) |
353 elif key == 'multipart/form-data': |
353 elif key == 'multipart/form-data': |
354 self.content.seek(0,0) |
354 self.content.seek(0, 0) |
355 form = FieldStorage(self.content, self.received_headers, |
355 form = FieldStorage(self.content, self.received_headers, |
356 environ={'REQUEST_METHOD': 'POST'}, |
356 environ={'REQUEST_METHOD': 'POST'}, |
357 keep_blank_values=1, |
357 keep_blank_values=1, |
358 strict_parsing=1) |
358 strict_parsing=1) |
359 for key in form: |
359 for key in form: |