benjamin-bader / amanuensis

ah - MAN - you - EN - sis: Web Traffic Inspector
GNU General Public License v3.0
2 stars 0 forks source link

Get rid of ProxyTransaction::impl::raw_input_ #9

Open benjamin-bader opened 6 years ago

benjamin-bader commented 6 years ago

Right now, we relay client requests (and server responses) byte-for-byte. We need to switch from replaying recorded bytes to generating HTTP messages, for a few reasons:

What we need to do is teach HttpMessage how to represent itself as a bytestring. This ideally will minimize memory copies, but practically speaking it's fine for a first pass to dump it all into a stringstream. Ideally we'd just yield an iterator and be dynamic about it; that's considerably tougher, at least in my imagination.