
Erik de Castro Lopo wrote:
I shied away from c) for two reasons:
- I thought exposing iterHeaders would have other uses as well.
- How do we know that we are at the end of the request body? With chunked/gzipped data (and no content-length header) the body decoder figures out where the end is.
I'll have a play with c) and see how it behaves. My idea is to simply be to add a
rawData :: Bool
field to the Request data structure. If that element is True then no dechunking or gunzipping will occur. Once I've tried this relatively trivial change I will know for sure what the happens at the end of the body.
This seems to work quite nicely. My proxy now works for a bunch of cases where it was failing before. I'll sumbit a pull request on hithub for this. Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/