comparison src/http/modules/ngx_http_proxy_module.c @ 3439:3354dfba9da4 stable-0.7

merge r3137, r3198, r3199, r3353, r3370, r3371, r3398, r3399: cache related fixes: *) do not pass buf with empty cached response, this fixes "zero size buf in output" alert *) hide cacheable Set-Cookie and P3P FastCGI response headers *) test comma separator in "Cache-Control" *) a cache manager thread handle was overwritten by a cache loader thread handle, this caused an exit delay, the bug had been introduced in r3248 *) fix handling cached HTTP/0.9 response *) log proxied HTTP/0.9 responses status as "009" *) fix the "If-None-Match" header name *) fix a cached zero-length body case
author Igor Sysoev <igor@sysoev.ru>
date Mon, 01 Feb 2010 15:46:14 +0000
parents 0189a8f4c7c3
children 667c22171519
comparison
equal deleted inserted replaced
3438:a0a131127626 3439:3354dfba9da4
528 { ngx_string("Connection"), ngx_string("close") }, 528 { ngx_string("Connection"), ngx_string("close") },
529 { ngx_string("Keep-Alive"), ngx_string("") }, 529 { ngx_string("Keep-Alive"), ngx_string("") },
530 { ngx_string("Expect"), ngx_string("") }, 530 { ngx_string("Expect"), ngx_string("") },
531 { ngx_string("If-Modified-Since"), ngx_string("") }, 531 { ngx_string("If-Modified-Since"), ngx_string("") },
532 { ngx_string("If-Unmodified-Since"), ngx_string("") }, 532 { ngx_string("If-Unmodified-Since"), ngx_string("") },
533 { ngx_string("If-Match-None"), ngx_string("") }, 533 { ngx_string("If-None-Match"), ngx_string("") },
534 { ngx_string("If-Match"), ngx_string("") }, 534 { ngx_string("If-Match"), ngx_string("") },
535 { ngx_string("Range"), ngx_string("") }, 535 { ngx_string("Range"), ngx_string("") },
536 { ngx_string("If-Range"), ngx_string("") }, 536 { ngx_string("If-Range"), ngx_string("") },
537 { ngx_null_string, ngx_null_string } 537 { ngx_null_string, ngx_null_string }
538 }; 538 };
1221 1221
1222 #if (NGX_HTTP_CACHE) 1222 #if (NGX_HTTP_CACHE)
1223 1223
1224 if (r->cache) { 1224 if (r->cache) {
1225 r->http_version = NGX_HTTP_VERSION_9; 1225 r->http_version = NGX_HTTP_VERSION_9;
1226 u->headers_in.status_n = NGX_HTTP_OK;
1227 return NGX_OK; 1226 return NGX_OK;
1228 } 1227 }
1229 1228
1230 #endif 1229 #endif
1231 1230
1237 return NGX_HTTP_UPSTREAM_INVALID_HEADER; 1236 return NGX_HTTP_UPSTREAM_INVALID_HEADER;
1238 } 1237 }
1239 #endif 1238 #endif
1240 1239
1241 r->http_version = NGX_HTTP_VERSION_9; 1240 r->http_version = NGX_HTTP_VERSION_9;
1242 u->headers_in.status_n = NGX_HTTP_OK;
1243 u->state->status = NGX_HTTP_OK; 1241 u->state->status = NGX_HTTP_OK;
1244 1242
1245 return NGX_OK; 1243 return NGX_OK;
1246 } 1244 }
1247 1245