Proxy : Why two places request structure is stored in upstream

punit kandoi pkopensrc at gmail.com
Sat Nov 22 08:14:06 UTC 2014


Hi,

I was reading world famous tutorial by Emiller. Nginx guide to module
development.

I was going to ngx_http_proxy_handler() as described in tutorial.

I seen request structure is stored in two places in upstream.

    u->pipe->input_filter = ngx_http_proxy_copy_filter;
    u->pipe->input_ctx = r;  <<------

    u->input_filter_init = ngx_http_proxy_input_filter_init;
    u->input_filter = ngx_http_proxy_non_buffered_copy_filter;
    u->input_filter_ctx = r;   <<------

Whats the difference between two variables?

If we want to take request structure from upstream in later stage before
selecting server which value to be used?

Awaiting for reply.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20141122/160ddd82/attachment.html>


More information about the nginx-devel mailing list