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
Subject Author Posted

'Content-Length' header for POSTs

joejacobs July 25, 2009 07:41AM

Re: 'Content-Length' header for POSTs

joejacobs July 25, 2009 12:05PM

Re: 'Content-Length' header for POSTs

joejacobs July 27, 2009 10:14PM

Re: 'Content-Length' header for POSTs

Maxim Dounin July 28, 2009 04:30AM

Re: 'Content-Length' header for POSTs

Igor Sysoev July 28, 2009 05:56AM

Re: 'Content-Length' header for POSTs

joejacobs July 28, 2009 06:25AM

Re: 'Content-Length' header for POSTs

Igor Sysoev July 28, 2009 07:22AM

Re: 'Content-Length' header for POSTs

wangkai October 19, 2009 10:59AM

Re: 'Content-Length' header for POSTs

agentzh October 20, 2009 03:06AM

Re: 'Content-Length' header for POSTs

joejacobs November 03, 2009 11:17AM

Re: 'Content-Length' header for POSTs

agentzh November 04, 2009 09:04PM

Re: 'Content-Length' header for POSTs

agentzh November 06, 2009 04:06AM

Re: 'Content-Length' header for POSTs

joejacobs November 08, 2009 06:28PM

Re: 'Content-Length' header for POSTs

agentzh November 13, 2009 06:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 251
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready