summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules/proxy
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-08-31 15:32:52 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-08-31 15:32:52 +0000
commit13836ce3e6a22c3c58b4696c1ec1d753dff57237 (patch)
tree74880a5cc6e592c952648d7d36077c86a0be13cc /src/http/modules/proxy
parent7105763f5b353df35505bec6598baf2830583c26 (diff)
downloadnginx-13836ce3e6a22c3c58b4696c1ec1d753dff57237.tar.gz
nginx-13836ce3e6a22c3c58b4696c1ec1d753dff57237.tar.bz2
nginx-0.0.10-2004-08-31-19:32:52 import
Diffstat (limited to 'src/http/modules/proxy')
-rw-r--r--src/http/modules/proxy/ngx_http_proxy_upstream.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/http/modules/proxy/ngx_http_proxy_upstream.c b/src/http/modules/proxy/ngx_http_proxy_upstream.c
index 80759aebf..8ac6d506a 100644
--- a/src/http/modules/proxy/ngx_http_proxy_upstream.c
+++ b/src/http/modules/proxy/ngx_http_proxy_upstream.c
@@ -617,18 +617,25 @@ static void ngx_http_proxy_connect(ngx_http_proxy_ctx_t *p)
}
if (r->request_body->buf) {
- if (!(output->free = ngx_alloc_chain_link(r->pool))) {
- ngx_http_proxy_finalize_request(p, NGX_HTTP_INTERNAL_SERVER_ERROR);
- return;
- }
+ if (r->request_body->temp_file->file.fd != NGX_INVALID_FILE) {
+
+ if (!(output->free = ngx_alloc_chain_link(r->pool))) {
+ ngx_http_proxy_finalize_request(p,
+ NGX_HTTP_INTERNAL_SERVER_ERROR);
+ return;
+ }
+
+ output->free->buf = r->request_body->buf;
+ output->free->next = NULL;
+ output->allocated = 1;
- output->free->buf = r->request_body->buf;
- output->free->next = NULL;
- output->allocated = 1;
+ r->request_body->buf->pos = r->request_body->buf->start;
+ r->request_body->buf->last = r->request_body->buf->start;
+ r->request_body->buf->tag = (ngx_buf_tag_t) &ngx_http_proxy_module;
- r->request_body->buf->pos = r->request_body->buf->start;
- r->request_body->buf->last = r->request_body->buf->start;
- r->request_body->buf->tag = (ngx_buf_tag_t) &ngx_http_proxy_module;
+ } else {
+ r->request_body->buf->pos = r->request_body->buf->start;
+ }
}
p->request_sent = 0;
@@ -647,6 +654,7 @@ static void ngx_http_proxy_connect(ngx_http_proxy_ctx_t *p)
ngx_http_proxy_process_upstream_status_line(c->read);
return;
}
+
#endif
ngx_http_proxy_send_request(p);