Welcome! Log In Create A New Profile

Advanced

Re: 'Content-Length' header for POSTs

agentzh
November 06, 2009 04:06AM
On Thu, Nov 5, 2009 at 9:56 AM, agentzh <agentzh@gmail.com> wrote:
>
> I've come up with this (naive) plan to add support for chunked request
> body without patching nginx:
>
>   location /foo {
>      echo_read_chunked_request_body;
>      echo_exec @foo;
>   }

Okay, I quickly realized that this approach won't fly after I actually
put my hands on it :) Nginx explicitly checks chunked
transfer-encoding headers and absent content length header in its very
early phase. Well, as early as the ngx_http_process_request_header
function. Sigh.

But no problem, thanks to chaoslawful++ for presenting another
approach to me. That is, using an output filter to intercept the 411
Length Required response issued by ngx_http_process_request_header,
fix things and issue an internal redirect to the current location,
thus starting from those phases we all know and love, this time
bypassing the horrible ngx_http_process_request_header function.

Now I'd like the chunked input feature to be in a separate module named chunkin:

http://github.com/agentzh/chunkin-nginx-module

It's still not fully working yet. I've just implemented and tested the
response rescue trick mentioned above. I'm about to implement the
chunked input reading handler already ;)

I'll keep you posted.

Stay tuned!
-agentzh
SubjectAuthorPosted

'Content-Length' header for POSTs

joejacobsJuly 25, 2009 07:41AM

Re: 'Content-Length' header for POSTs

joejacobsJuly 25, 2009 12:05PM

Re: 'Content-Length' header for POSTs

joejacobsJuly 27, 2009 10:14PM

Re: 'Content-Length' header for POSTs

Maxim DouninJuly 28, 2009 04:30AM

Re: 'Content-Length' header for POSTs

Igor SysoevJuly 28, 2009 05:56AM

Re: 'Content-Length' header for POSTs

joejacobsJuly 28, 2009 06:25AM

Re: 'Content-Length' header for POSTs

Igor SysoevJuly 28, 2009 07:22AM

Re: 'Content-Length' header for POSTs

wangkaiOctober 19, 2009 10:59AM

Re: 'Content-Length' header for POSTs

agentzhOctober 20, 2009 03:06AM

Re: 'Content-Length' header for POSTs

joejacobsNovember 03, 2009 11:17AM

Re: 'Content-Length' header for POSTs

agentzhNovember 04, 2009 09:04PM

Re: 'Content-Length' header for POSTs

agentzhNovember 06, 2009 04:06AM

Re: 'Content-Length' header for POSTs

joejacobsNovember 08, 2009 06:28PM

Re: 'Content-Length' header for POSTs

agentzhNovember 13, 2009 06:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 93
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 165 on April 21, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready