Implementing HTTP/1.1 request chunking
ian.greenhoe at mandiant.com
Fri Jan 15 17:47:41 MSK 2010
On 1/15/10 5:04 AM, "agentzh" <agentzh at gmail.com> wrote:
> On Fri, Jan 15, 2010 at 3:19 PM, Ian Greenhoe <ian.greenhoe at mandiant.com>
>> So, my question is this --
>> What, as a developer, would I need to do so that I could create a patch for
>> this that would be accepted as part of the Nginx distribution?
> I started writing the ngx_chunkin module just because it's
> particularly hard (for me) to create a patch (of this size) that can
> be accepted by Igor Sysoev. Patching the core would be much much
> easier than doing chunked reading from outside :)
Ooh, yeah. It would definitely be easier to patch the core... Which is why I
>> I know that some of the items on this list so far are:
>> 1) That the patch works.
> ngx_chunkin works :) AFAIK, some people have already put it into production :)
Didn't mean to imply that it didn't -- I'm just listing all of the
>> 2) Error checking -- check the size of the chunks & that the series of
>> chunks are terminated properly.
> ngx_chunkin honors the http core module's max_client_body_size
> directive settings, as well as the client_body_buffer_size and
> client_body_timeout settings.
This is exactly the sort of thing that I need to know.
>> 3) Don't use Ragel. :) Or, for that matter, any tool not already in use by
>> the Nginx build process.
> Okay, ngx_chunkin uses Ragel just to eliminate a lot of boring code
> for truly streaming parsing. Fortunately we can generate C source
> before we make a release such that the end user don't need to know
> anything about Ragel :)
I understand -- I've both used parser generators and coded parsers by hand.
Using parser generators is much preferred.
> I'm not meant to discourage your efforts. If your patch gets accepted
> by the core, I'd happily mark ngx_chunkin as obsolete and just
> encourage people to use it if they have to stick with an earlier nginx
> version for some reasons.
Here's to hoping that I can obsolete your code. :)
More information about the nginx