Mercurial > hg > nginx-quic
comparison src/http/ngx_http_request_body.c @ 5174:f458156fd46a
Request body: only read body in main request (ticket #330).
Before 1.3.9 an attempt to read body in a subrequest only caused problems
if body wasn't already read or discarded in a main request. Starting with
1.3.9 it might also cause problems if body was discarded by a main request
before subrequest start.
Fix is to just ignore attempts to read request body in a subrequest, which
looks like right thing to do anyway.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 16 Apr 2013 10:14:59 +0000 |
parents | c0f7b94e88ba |
children | 3494f14aa46a |
comparison
equal
deleted
inserted
replaced
5173:5373be93c0be | 5174:f458156fd46a |
---|---|
47 rc = ngx_http_spdy_read_request_body(r, post_handler); | 47 rc = ngx_http_spdy_read_request_body(r, post_handler); |
48 goto done; | 48 goto done; |
49 } | 49 } |
50 #endif | 50 #endif |
51 | 51 |
52 if (r->request_body || r->discard_body) { | 52 if (r != r->main || r->request_body || r->discard_body) { |
53 post_handler(r); | 53 post_handler(r); |
54 return NGX_OK; | 54 return NGX_OK; |
55 } | 55 } |
56 | 56 |
57 if (ngx_http_test_expect(r) != NGX_OK) { | 57 if (ngx_http_test_expect(r) != NGX_OK) { |