internetarchive / warcprox

WARC writing MITM HTTP/S proxy
378 stars 54 forks source link

avoid exception sending error to client #122

Closed nlevitt closed 5 years ago

nlevitt commented 5 years ago

this is a slightly different approach to https://github.com/internetarchive/warcprox/pull/121

vbanos commented 5 years ago

From my experience its faster if we avoid raising the exception entirely.

Still, your suggestion is an improvement over the current situation and its very welcome!

nlevitt commented 5 years ago

From my experience its faster if we avoid raising the exception entirely.

Yeah it should be faster but I would be surprised if the difference is big enough to matter.

Also with the #121 approach there's a possibility of a race condition, at least there might be, it would take some analysis to be sure that there isn't. And there are other reasons that I prefer this approach.

In any case this has been an annoyance with warcprox for a long time, so thank you for making this fix happen!

vbanos commented 5 years ago

I'm really happy to help. More improvements are pending :)