[PATCH] upstream process header data

李飞勃 lifeibo382005 at gmail.com
Thu Feb 9 09:43:19 UTC 2012


    I encountered a problem when I write a upstream module to process
data from my upstream server.
    I set the header recv buffer to a small size that can not hold the
whole response header. While in my process_header handler of my
module, it will wait for the whole response header to process header,
then return NGX_AGAIN and leave data in u->buffer not processed(in
this case, u->buffer->pos < u->buffer->last). Then u->buffer->pos will
never equal to u->buffer->end, and nginx will nerver log "upstream
send too big header". This will cause nginx to call recv again with
zero buffer size.
    I think this may be a problem, and I made a patch for that.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx-1.0.12-upstream_read_header.patch
Type: application/octet-stream
Size: 449 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20120209/60ec70ef/attachment.obj>

More information about the nginx-devel mailing list