comparison src/http/ngx_http_core_module.h @ 4206:1a94a56a4e5d

Clear old Location header (if any) while adding a new one. This prevents incorrect behaviour when another redirect is issued within error_page 302 handler.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 12 Oct 2011 13:28:03 +0000
parents 82738a316a54
children c4513d4dd024 4919fb357a5d
comparison
equal deleted inserted replaced
4205:26c307b8dc3c 4206:1a94a56a4e5d
527 if (r->headers_out.last_modified) { \ 527 if (r->headers_out.last_modified) { \
528 r->headers_out.last_modified->hash = 0; \ 528 r->headers_out.last_modified->hash = 0; \
529 r->headers_out.last_modified = NULL; \ 529 r->headers_out.last_modified = NULL; \
530 } 530 }
531 531
532 #define ngx_http_clear_location(r) \
533 \
534 if (r->headers_out.location) { \
535 r->headers_out.location->hash = 0; \
536 r->headers_out.location = NULL; \
537 }
538
532 539
533 #endif /* _NGX_HTTP_CORE_H_INCLUDED_ */ 540 #endif /* _NGX_HTTP_CORE_H_INCLUDED_ */