aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/proxy/ngx_http_proxy_upstream.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-11-17 16:15:03 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-11-17 16:15:03 +0000
commitd7fdb3535bc277d0bc16d31981bb84d30c45500f (patch)
tree4ddeecc1f37dd3d2626b6a79806000a9466b3436 /src/http/modules/proxy/ngx_http_proxy_upstream.c
parentf2e676aa1585de170b39cf3e9d71b88db47e4b1b (diff)
downloadnginx-d7fdb3535bc277d0bc16d31981bb84d30c45500f.tar.gz
nginx-d7fdb3535bc277d0bc16d31981bb84d30c45500f.zip
nginx-0.0.1-2003-11-17-19:15:03 import
Diffstat (limited to 'src/http/modules/proxy/ngx_http_proxy_upstream.c')
-rw-r--r--src/http/modules/proxy/ngx_http_proxy_upstream.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/http/modules/proxy/ngx_http_proxy_upstream.c b/src/http/modules/proxy/ngx_http_proxy_upstream.c
index 0a5ecd2fc..ec4c425b1 100644
--- a/src/http/modules/proxy/ngx_http_proxy_upstream.c
+++ b/src/http/modules/proxy/ngx_http_proxy_upstream.c
@@ -956,10 +956,18 @@ static void ngx_http_proxy_send_response(ngx_http_proxy_ctx_t *p)
}
ep->preread_hunks->hunk = p->header_in;
ep->preread_hunks->next = NULL;
- p->header_in->type |= NGX_HUNK_PREREAD;
ep->preread_size = p->header_in->last - p->header_in->pos;
+ ep->hunk_to_file = ngx_calloc_hunk(r->pool);
+ if (ep->preread_hunks == NULL) {
+ ngx_http_proxy_finalize_request(p, 0);
+ return;
+ }
+ ep->hunk_to_file->pos = p->header_in->start;
+ ep->hunk_to_file->last = p->header_in->pos;
+ ep->hunk_to_file->type = NGX_HUNK_IN_MEMORY|NGX_HUNK_TEMP;
+
if (ngx_event_flags & NGX_USE_AIO_EVENT) {
/* the posted aio operation can currupt shadow buf */