[PATCH] RFC: ngx_http_upstream_process_upgraded: Allocate buffers also for data from upstream

Thomas Glanzmann thomas at glanzmann.de
Mon Mar 17 08:02:45 UTC 2014


Hello Maxim,

> The u->buffer is allocated by ngx_http_upstream_process_header(), 
> and ngx_http_upstream_upgrade() cannot be called bypassing 
> ngx_http_upstream_process_header().

> That is, the change you suggest isn't needed in vanilla nginx 
> (even with custom modules).

I agree. The reason for my modification was that I called
ngx_http_upstream_upgrade in ngx_http_upstream_connect because I wanted
to avoid that the original request was sent to upstream.

Cheers,
        Thomas



More information about the nginx mailing list