comparison src/http/modules/proxy/ngx_http_proxy_upstream.c @ 304:bcbe876f4262

nginx-0.0.3-2004-04-02-09:14:40 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 02 Apr 2004 05:14:40 +0000
parents 00c5660d2707
children 98f1a8028067
comparison
equal deleted inserted replaced
303:00c5660d2707 304:bcbe876f4262
1197 ep->preread_hunks->hunk = p->header_in; 1197 ep->preread_hunks->hunk = p->header_in;
1198 ep->preread_hunks->next = NULL; 1198 ep->preread_hunks->next = NULL;
1199 1199
1200 ep->preread_size = p->header_in->last - p->header_in->pos; 1200 ep->preread_size = p->header_in->last - p->header_in->pos;
1201 1201
1202 ep->hunk_to_file = ngx_calloc_hunk(r->pool); 1202 if (p->cachable) {
1203 if (ep->preread_hunks == NULL) { 1203 ep->hunk_to_file = ngx_calloc_hunk(r->pool);
1204 ngx_http_proxy_finalize_request(p, 0); 1204 if (ep->hunk_to_file == NULL) {
1205 return; 1205 ngx_http_proxy_finalize_request(p, 0);
1206 } 1206 return;
1207 ep->hunk_to_file->pos = p->header_in->start; 1207 }
1208 ep->hunk_to_file->last = p->header_in->pos; 1208 ep->hunk_to_file->pos = p->header_in->start;
1209 ep->hunk_to_file->type = NGX_HUNK_IN_MEMORY|NGX_HUNK_TEMP; 1209 ep->hunk_to_file->last = p->header_in->pos;
1210 ep->hunk_to_file->type = NGX_HUNK_IN_MEMORY|NGX_HUNK_TEMP;
1211 }
1210 1212
1211 if (ngx_event_flags & NGX_USE_AIO_EVENT) { 1213 if (ngx_event_flags & NGX_USE_AIO_EVENT) {
1212 /* the posted aio operation can currupt a shadow buffer */ 1214 /* the posted aio operation can currupt a shadow buffer */
1213 ep->single_buf = 1; 1215 ep->single_buf = 1;
1214 } 1216 }