Mercurial > hg > nginx-quic
comparison src/http/modules/proxy/ngx_http_proxy_upstream.c @ 170:c42be4185301
nginx-0.0.1-2003-11-03-01:56:18 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 02 Nov 2003 22:56:18 +0000 |
parents | |
children | aff0e5d32af8 |
comparison
equal
deleted
inserted
replaced
169:edf29bb717da | 170:c42be4185301 |
---|---|
1 | |
2 #include <ngx_config.h> | |
3 #include <ngx_core.h> | |
4 #include <ngx_event.h> | |
5 #include <ngx_event_connect.h> | |
6 #include <ngx_event_pipe.h> | |
7 #include <ngx_http.h> | |
8 #include <ngx_http_proxy_handler.h> | |
9 | |
10 | |
11 void ngx_http_proxy_reinit_upstream(ngx_http_proxy_ctx_t *p) | |
12 { | |
13 ngx_chain_t *cl; | |
14 ngx_output_chain_ctx_t *octx; | |
15 | |
16 octx = p->output_chain_ctx; | |
17 | |
18 /* reinit the request chain */ | |
19 | |
20 for (cl = p->request->request_hunks; cl; cl = cl->next) { | |
21 cl->hunk->pos = cl->hunk->start; | |
22 } | |
23 | |
24 /* reinit ngx_output_chain() context */ | |
25 | |
26 octx->hunk = NULL; | |
27 octx->in = NULL; | |
28 octx->free = NULL; | |
29 octx->busy = NULL; | |
30 | |
31 /* reinit r->header_in buffer */ | |
32 | |
33 if (p->header_in) { | |
34 if (p->cache) { | |
35 p->header_in->pos = p->header_in->start + p->cache->ctx.header.size; | |
36 p->header_in->last = p->header_in->pos; | |
37 | |
38 } else { | |
39 p->header_in->pos = p->header_in->start; | |
40 p->header_in->last = p->header_in->start; | |
41 } | |
42 } | |
43 } |