Hi,
This bug may appear when I use subrequest with flag
NGX_HTTP_SUBREQUEST_IN_MEMORY to a upstream url. If the server returns
a empty body, we say the content_length set to 0, so in upstream, the
u->length set to 0 and the u->buffer is empty too. Empty u->buffer
causes if (n) statement not be executed. Since we can not known the
end of current response, we enter
ngx_http_upstream_process_body_in_memory to recv more data. While the
server will not return more data, in this case, recv will timeout.
In my patch, before call ngx_http_upstream_process_body_in_memory, if
the u->length is zero, we finalize current request and do not read
more data.
Thanks.
Feibo Li
email : lifeibo382005@gmail.com
sina weibo: www.weibo.com/lifeibo
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel