mitmproxy/libmproxy
Aldo Cortesi 16654ad6a4 Fix crash while streaming
Found using fuzzing. Reproduction with pathoc, given "mitmproxy -s" and
pathod running on 9999:

get:'http://localhost:9999/p/':s'200:b\'foo\':h\'Content-Length\'=\'3\'':i58,'\x1a':r

 return flow.FlowMaster.run(self)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/controller.py", line 111, in run
     self.tick(self.masterq, 0.01)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/flow.py", line 613, in tick
     return controller.Master.tick(self, q, timeout)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/controller.py", line 101, in tick
     self.handle(*msg)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/controller.py", line 118, in handle
     m(obj)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/flow.py", line 738, in handle_responseheaders
     self.stream_large_bodies.run(f, False)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/flow.py", line 155, in run
     r.headers, is_request, flow.request.method, code
   File "/Users/aldo/mitmproxy/mitmproxy/netlib/http.py", line 401, in expected_http_body_size
     raise HttpError(400 if is_request else 502, "Invalid content-length header: %s" % headers["content-length"])
 netlib.http.HttpError: Invalid content-length header: ['\x1a3']
2014-10-26 17:58:36 +13:00
..
console add generic tcp proxying, fix #374 2014-10-18 18:29:35 +02:00
contrib fix jsunpacker imports 2014-09-09 01:15:35 +02:00
onboarding use bowser-installer 2014-09-13 16:28:45 +02:00
platform fix bugs 2014-09-15 00:59:21 +02:00
protocol Fix crash while streaming 2014-10-26 17:58:36 +13:00
proxy Start a fuzzing architecture for mitmproxy 2014-10-26 17:13:25 +13:00
web add generic tcp proxying, fix #374 2014-10-18 18:29:35 +02:00
__init__.py Move version constants to version.py, add version to serialized flows. 2011-03-09 12:36:14 +13:00
cmdline.py Fix crash while streaming 2014-10-26 17:58:36 +13:00
controller.py add features to the traffic table, introduce image spriting 2014-09-17 21:14:55 +02:00
dump.py Start a fuzzing architecture for mitmproxy 2014-10-26 17:13:25 +13:00
encoding.py always use relative imports, fix status bar bug 2014-03-10 22:36:47 +01:00
filt.py improve HTTPRequest syntax 2014-09-03 23:44:54 +02:00
flow.py Fix crash while streaming 2014-10-26 17:58:36 +13:00
main.py connect eventlog events to ui 2014-09-17 15:22:42 +02:00
script.py update examples, fix #353 2014-09-08 17:03:34 +02:00
stateobject.py clean up timestamp handling 2014-09-21 22:46:48 +02:00
tnetstring.py Force flush of file content in dump 2013-01-24 20:46:50 -08:00
utils.py suppress SPDY/HTTP2 announcement headers, fix #277 2014-08-03 16:25:38 +02:00
version.py fix minor version string 2014-03-19 16:05:19 +01:00