Proxy : Why two places request structure is stored in upstream

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


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

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: <>

More information about the nginx-devel mailing list