Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 4640:07f028df3879
Fixed segfault with filter_finalize introduced in r4621 (1.3.0).
Example configuration to reproduce:
location /image/ {
error_page 415 = /zero;
image_filter crop 100 100;
proxy_pass http://127.0.0.1:8080;
proxy_store on;
}
location /zero {
return 204;
}
The problem appeared if upstream returned (big enough) non-image file,
causing 415 to be generated by image filter.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 17 May 2012 17:41:40 +0000 |
parents | 204b780a89de |
children | 79c147bdeb6a |
comparison
equal
deleted
inserted
replaced
4639:944839adc406 | 4640:07f028df3879 |
---|---|
1931 return; | 1931 return; |
1932 } | 1932 } |
1933 | 1933 |
1934 if (rc == NGX_OK && r->filter_finalize) { | 1934 if (rc == NGX_OK && r->filter_finalize) { |
1935 c->error = 1; | 1935 c->error = 1; |
1936 ngx_http_finalize_connection(r); | |
1937 return; | |
1938 } | 1936 } |
1939 | 1937 |
1940 if (rc == NGX_DECLINED) { | 1938 if (rc == NGX_DECLINED) { |
1941 r->content_handler = NULL; | 1939 r->content_handler = NULL; |
1942 r->write_event_handler = ngx_http_core_run_phases; | 1940 r->write_event_handler = ngx_http_core_run_phases; |