Closed bsyk closed 6 years ago
As this middleware is used to proxy to another server, should the error code on timeout be 504 (Gateway Timeout) rather than 408 (Request Timeout)? https://github.com/4front/express-request-proxy/blob/master/lib/proxy.js#L265
The issue here is that the HTTP specification for 408 allows clients to repeat the request. It seems that modern browsers (i.e. Chrome) will retry a few times before providing the error code to the client application. https://tools.ietf.org/html/rfc2068#section-10.4.9 vs https://tools.ietf.org/html/rfc2068#section-10.5.5
What do you think?
I second this. Gateway timeout is more accurate and Chrome's auto-retry behavior causes my app to spam the upstream API.
Fixed in #36
As this middleware is used to proxy to another server, should the error code on timeout be 504 (Gateway Timeout) rather than 408 (Request Timeout)? https://github.com/4front/express-request-proxy/blob/master/lib/proxy.js#L265
The issue here is that the HTTP specification for 408 allows clients to repeat the request. It seems that modern browsers (i.e. Chrome) will retry a few times before providing the error code to the client application. https://tools.ietf.org/html/rfc2068#section-10.4.9 vs https://tools.ietf.org/html/rfc2068#section-10.5.5
What do you think?