0

We had a scenario where a proxy server was not finishing requests (kept waiting until timeout) with http status codes 304. Reason was, that our server was not returning a "Connection" Header. If we return a "Connection" Header (keep-alive or close), then the proxy server is closing the requests properly...

I have not found any information on how http Clients should behave when finishing requests in Scenarios with 304 Status codes and missing/present Connection Headers.

Can anyone point out the rfc/rfcs that can describe the correct behaviour of a http client with the combination of headers?

Martin
  • 3,018
  • 1
  • 26
  • 45
  • Well, the applicable RFCs are RFC 7230 and RFC 7231. That said, maybe your server is broken? What exactly does it return with the 304? Body? Content-Length? – Julian Reschke Jul 05 '18 at 08:45
  • I will test this as soon as my local cache expires again. Content-length is sent, but it is quite different than the request-size that the browser shows in debugging tools (either the difference is because the browser includes headers, or the server might be sending it wrong, will be checking that too). We could fix it for now making sure that Connection: keep-alive is always sent, but I want to make sure that everything works RFC-conform... ;) – Martin Jul 05 '18 at 08:50
  • Do you send a response body? If so, that would explain the weirdness. – Julian Reschke Jul 05 '18 at 09:11

0 Answers0