Re: Compliance: reply with 400 (Bad Request) if request header is too big
The added comment applies to the whole 6xx class, not just 601. Note: Not entirely sure we need these as internal http status codes in squid-3, but that's separate from this change. sön 2010-08-29 klockan 14:57 -0600 skrev Alex Rousskov: HTTP_INSUFFICIENT_STORAGE = 507,/** RFC2518 section 10.6 */ HTTP_INVALID_HEADER = 600, /** Squid header parsing error */ -HTTP_HEADER_TOO_LARGE = 601 /* Header too large to process */ +HTTP_HEADER_TOO_LARGE = 601 /** Header too large to process. Used + internally only, replying to client + with HTTP_BAD_REQUEST instead. */
Re: Compliance: reply with 400 (Bad Request) if request header is too big
On 08/30/2010 01:44 AM, Henrik Nordström wrote: The added comment applies to the whole 6xx class, not just 601. We have only two 6xx constants. Are you saying HTTP_INVALID_HEADER (600) is never sent to the client? I will adjust the comment if that is the case. Note: Not entirely sure we need these as internal http status codes in squid-3, but that's separate from this change. Agreed on both counts. Thank you, Alex. sön 2010-08-29 klockan 14:57 -0600 skrev Alex Rousskov: HTTP_INSUFFICIENT_STORAGE = 507,/** RFC2518 section 10.6 */ HTTP_INVALID_HEADER = 600, /** Squid header parsing error */ -HTTP_HEADER_TOO_LARGE = 601 /* Header too large to process */ +HTTP_HEADER_TOO_LARGE = 601 /** Header too large to process. Used + internally only, replying to client + with HTTP_BAD_REQUEST instead. */
Re: Compliance: reply with 400 (Bad Request) if request header is too big
- Ursprungsmeddelande - On 08/30/2010 01:44 AM, Henrik Nordström wrote: The added comment applies to the whole 6xx class, not just 601. We have only two 6xx constants. Are you saying HTTP_INVALID_HEADER (600) is never sent to the client? I will adjust the comment if that is the case. Correct. Bad header parsing a request is 400 bad request. bad header parsing a response is 504 bad gateway. Regards Henrik
Re: Compliance: reply with 400 (Bad Request) if request header is too big
On Sun, 29 Aug 2010 14:57:08 -0600, Alex Rousskov rouss...@measurement-factory.com wrote: Compliance: reply with 400 (Bad Request) if request header is too big. Reply with a standard 400 (Bad Request) instead of 601 (Unknown) status in case of an ERR_TOO_BIG error. HTTP does not have a dedicated code for the too-big header error. There is 414 (Request-URI Too Long), but Squid does not distinguish too-large headers from too-large URIs. Co-Advisor test case: test_case/rfc2616/longUri-65536 +1. NP: Followup to the unit-test and HttpParser work I'm doing now on the request-line parser leads to sending those 414 and other closely related errors instead of the generic one. Amos