aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/proxy/ngx_http_proxy_handler.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-11-20 17:36:43 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-11-20 17:36:43 +0000
commit1ef225254ef3f7fc5470289bdeabad2e31507d55 (patch)
tree5a11f95ce27d89ff01dbd75305fe5dd41857ad4f /src/http/modules/proxy/ngx_http_proxy_handler.c
parentbb6ec8c9fd4d23848ac3dddb1296d8fac5c99da8 (diff)
downloadnginx-1ef225254ef3f7fc5470289bdeabad2e31507d55.tar.gz
nginx-1ef225254ef3f7fc5470289bdeabad2e31507d55.zip
nginx-0.0.1-2003-11-20-20:36:43 import
Diffstat (limited to 'src/http/modules/proxy/ngx_http_proxy_handler.c')
-rw-r--r--src/http/modules/proxy/ngx_http_proxy_handler.c29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/http/modules/proxy/ngx_http_proxy_handler.c b/src/http/modules/proxy/ngx_http_proxy_handler.c
index b7487f833..25f5b3371 100644
--- a/src/http/modules/proxy/ngx_http_proxy_handler.c
+++ b/src/http/modules/proxy/ngx_http_proxy_handler.c
@@ -448,8 +448,11 @@ void ngx_http_proxy_busy_lock_handler(ngx_event_t *rev)
void ngx_http_proxy_finalize_request(ngx_http_proxy_ctx_t *p, int rc)
{
- ngx_log_debug(p->request->connection->log,
- "finalize http proxy request");
+ ngx_http_request_t *r;
+
+ r = p->request;
+
+ ngx_log_debug(r->connection->log, "finalize http proxy request");
if (p->upstream && p->upstream->peer.connection) {
ngx_http_proxy_close_connection(p);
@@ -462,11 +465,27 @@ void ngx_http_proxy_finalize_request(ngx_http_proxy_ctx_t *p, int rc)
}
if (p->saved_ctx) {
- p->request->connection->log->data = p->saved_ctx;
- p->request->connection->log->handler = p->saved_handler;
+ r->connection->log->data = p->saved_ctx;
+ r->connection->log->handler = p->saved_handler;
+ }
+
+ if (p->upstream && p->upstream->event_pipe) {
+ngx_log_debug(r->connection->log, "TEMP FD: %d" _
+ p->upstream->event_pipe->temp_file->file.fd);
+ }
+
+ if (p->cache) {
+ngx_log_debug(r->connection->log, "CACHE FD: %d" _ p->cache->ctx.file.fd);
+ }
+
+ if (p->upstream && p->upstream->event_pipe) {
+ r->file.fd = p->upstream->event_pipe->temp_file->file.fd;
+
+ } else if (p->cache) {
+ r->file.fd = p->cache->ctx.file.fd;
}
- ngx_http_finalize_request(p->request, rc);
+ ngx_http_finalize_request(r, rc);
}