This is a big patch removing the assumption that there's one connection per
Request/Response pair. It touches pretty much every part of mitmproxy, so
expect glitches until everything is ironed out.
Adds support for chunked transfer encoding, and a couple other minor
protocol corrections.
Improve HTTP support
- Support intercepted requests with Host header
- Support HEAD requests proper
- Support any HTTP method including extensions, not just a couple known ones
Support expect: 100-continue and 100 Continue messages
Persistent client connections
Generalize ServerConnection a bit in preparation for keep-alive support
Correct HTTP status codes on errors forwarding the request
External scripts can read a flow, modify it, and then return it to mitmproxy
using a simple API.
The "|" keyboard shortcut within mitmproxy prompts the user for a script.
Also, since BeautifulSoup is so damn slow, print a statusbar message saying
that we're calculating a pretty version of the response. Maybe I should add
hangman or something, becuase on a 200k document this can take ages.
This just makes sense. Later on, we'll have a config file in which users can
set the palette, so that they can over-ride the default background if they
really want.
- The "B" key now sets a filter pattern. Whenever the filter matches, the
terminal beeps.
- The beep specification is now stored in the State object, where I want to
keep all mutable state.
- I've removed the startup flags for beeping for now. We probably want to let
users specify a number of options on startup, including interception patterns
and limits. When we do this, we should also separate out the dumping and
curses programs, because many of these options will only make sense in one of
the two.
- This isn't an exact replacement for the beep functionality I ripped out,
because specifying beeping on intercept is slightly cumbersome (you need to
re-specify the intercept pattern using B). Sorry - we'll add a better way
soon.