proxy-php icon indicating copy to clipboard operation
proxy-php copied to clipboard

Slow requests throws remote headers in body

Open stonor opened this issue 11 years ago • 0 comments

Hi, I have just given the proxy a shot and it seems to work fine. One issue that took some time to figure out, though: Sometimes I'm getting remote http headers in the body. I looks like the reason is that the response has not returned before the http headers get parsed and the socket object gets passed along with the remote headers intact.

Setting the timeout higher than 5 seconds fixes the issue. What about setting the default timeout higher than 5 seconds and throw a hard error (such as http 504) when a request times out?

It would be easier to handle than figure out why http headers suddenly is a part of the payload.

stonor avatar Apr 03 '14 14:04 stonor