Upstream: upstream argument in ngx_http_upstream_process_request(). In case of filter finalization, r->upstream might be changed during the ngx_event_pipe() call. Added an argument to preserve it while calling the ngx_http_upstream_process_request() function.