chopshop icon indicating copy to clipboard operation
chopshop copied to clipboard

Add an option which causes http_extractor to dump data at times more friendly to partial conversations

Open kcreyts opened this issue 12 years ago • 1 comments

http_extractor currently dumps data when there is a request with a non-zero-length body or there is a request followed by a response with a non-zero length body.

This leads to failure to parse partial conversations, or conversations which are of poor or unexpected form.

Writing an http_extractor which works flawlessly on any partial, damaged, or malformed conversations may be far out of scope, but a little flexibility in the dumping behavior would go a long ways.

There should be an option to specify the dumping behavior; by the parameter of the option, the user should be able to elect to dump parts of each transaction at the following times: after each header specified for extraction in the transaction is parsed, when all headers for a transaction are parsed, when the body length of any transaction is determined to be zero (when any transaction does not have a body), when any transaction body callback is about to complete, or when the response completes.

The simple goal is to handle partial conversations a bit more gracefully.

kcreyts avatar Nov 01 '13 22:11 kcreyts

I'm all for this. If you want to come up with a patch I'd be more than happy to get it into the tree.

wxsBSD avatar Nov 02 '13 19:11 wxsBSD