Content-Length is not ignored for chunked requests: Nginx violates RFC 2616

agentzh agentzh at gmail.com
Fri Dec 18 10:05:01 MSK 2009


On Fri, Dec 18, 2009 at 10:52 AM, agentzh <agentzh at gmail.com> wrote:
>
> I'd really hope to see this issue gets fixed in the mainstream version
> of nginx AND get a work-around for existing versions >= 0.7.21 ;)
>

Okay, I've found out a quick workaround and got my tests passing completely :D

Essentially I now require my ngx_chunkin module's users to define a
411 error_page themselves, like this:

     chunkin on;
     error_page 411 = @my_error;
     location @my_error {
         chunkin_resume;
     }

That is, custom error pages take precedence over the default
"discard_request_body" call. It's surely a hack, but it works for me
;)

Still I'd love to see this content-length issue gets resolved in the
core. I won't mind adding a few more instances of #if and #else :)

> Any help will be highly appreciated :)
>

Ditto :)

Thanks!
-agentzh



More information about the nginx-devel mailing list