You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Nick Kew <ni...@webthing.com> on 2010/11/13 00:22:03 UTC

Error returned on broken chunking

I've just been failing to diagnose someone on IRC's problem
with httpd returning 503 (Service Unavailable).

A look at the source turns up just one usage outside the
script and proxy paths: in ap_http_filter, it returns
SERVICE_UNAVAILABLE on encountering a chunked encoding error.
This looks like a bug to me: surely that should return 400
on bad request from the client.

The other case would be reading broken chunking coming from
a backend when 502 (not 503) looks correct.  But that's
only really useful for logging, as it's unlikely to be
encountered before the response status has been sent
down the wire.

Any strong rationale for 503, or should I just change
it to 400?

-- 
Nick Kew

Re: Error returned on broken chunking

Posted by Jeff Trawick <tr...@gmail.com>.
On Fri, Nov 12, 2010 at 6:22 PM, Nick Kew <ni...@webthing.com> wrote:
> I've just been failing to diagnose someone on IRC's problem
> with httpd returning 503 (Service Unavailable).
>
> A look at the source turns up just one usage outside the
> script and proxy paths: in ap_http_filter, it returns
> SERVICE_UNAVAILABLE on encountering a chunked encoding error.
> This looks like a bug to me: surely that should return 400
> on bad request from the client.
>
> The other case would be reading broken chunking coming from
> a backend when 502 (not 503) looks correct.  But that's
> only really useful for logging, as it's unlikely to be
> encountered before the response status has been sent
> down the wire.
>
> Any strong rationale for 503, or should I just change
> it to 400?

change it

Re: Error returned on broken chunking

Posted by Graham Leggett <mi...@sharp.fm>.
On 13 Nov 2010, at 1:22 AM, Nick Kew wrote:

> Any strong rationale for 503, or should I just change
> it to 400?

400 looks like the correct code to use, yes.

Regards,
Graham
--