Brian Bruns brian.bruns at
Mon Oct 6 05:59:01 MSD 2008

Hi all,

I'm writing a module for nginx and am hoping someone could enlighten me.

The module takes in some parameters via either GET or POST methods.
Everything works fine except when using Python's urllib which appears
to send the HTTP POST data as two TCP packets.

The short of it is that ngx_http_read_client_request_body() returns
NGX_AGAIN because c->read->ready is not set.  My module in turn passes
NGX_AGAIN back up to the calling routine.

The confusing part to me is the following lines from

    if (r->content_handler) {
        r->write_event_handler = ngx_http_request_empty_handler;
        ngx_http_finalize_request(r, r->content_handler(r));
        return NGX_OK;

which appears to (according the debug stuff in the log) simply close
out the connection regardless of the return value from
content_handler().  Shouldn't my module be getting re-called when more
data is available from the connection or am I misunderstanding

Thanks in advance,


More information about the nginx mailing list