|
|
008793 |
--- a/modules/proxy/mod_proxy_fcgi.c 2015/01/09 21:25:26 1650676
|
|
|
008793 |
+++ b/modules/proxy/mod_proxy_fcgi.c 2015/01/09 21:33:12 1650677
|
|
|
008793 |
@@ -367,7 +367,7 @@
|
|
|
008793 |
request_rec *r, int request_id)
|
|
|
008793 |
{
|
|
|
008793 |
apr_bucket_brigade *ib, *ob;
|
|
|
008793 |
- int seen_end_of_headers = 0, done = 0;
|
|
|
008793 |
+ int seen_end_of_headers = 0, done = 0, ignore_body = 0;
|
|
|
008793 |
apr_status_t rv = APR_SUCCESS;
|
|
|
008793 |
int script_error_status = HTTP_OK;
|
|
|
008793 |
conn_rec *c = r->connection;
|
|
|
008793 |
@@ -577,9 +577,16 @@
|
|
|
008793 |
APR_BRIGADE_INSERT_TAIL(ob, tmp_b);
|
|
|
008793 |
r->status = status;
|
|
|
008793 |
ap_pass_brigade(r->output_filters, ob);
|
|
|
008793 |
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01070)
|
|
|
008793 |
- "Error parsing script headers");
|
|
|
008793 |
- rv = APR_EINVAL;
|
|
|
008793 |
+ if (status == HTTP_NOT_MODIFIED) {
|
|
|
008793 |
+ /* The 304 response MUST NOT contain
|
|
|
008793 |
+ * a message-body, ignore it. */
|
|
|
008793 |
+ ignore_body = 1;
|
|
|
008793 |
+ }
|
|
|
008793 |
+ else {
|
|
|
008793 |
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01070)
|
|
|
008793 |
+ "Error parsing script headers");
|
|
|
008793 |
+ rv = APR_EINVAL;
|
|
|
008793 |
+ }
|
|
|
008793 |
break;
|
|
|
008793 |
}
|
|
|
008793 |
|
|
|
008793 |
@@ -598,7 +605,7 @@
|
|
|
008793 |
r->status = HTTP_OK;
|
|
|
008793 |
}
|
|
|
008793 |
|
|
|
008793 |
- if (script_error_status == HTTP_OK) {
|
|
|
008793 |
+ if (script_error_status == HTTP_OK && !ignore_body) {
|
|
|
008793 |
rv = ap_pass_brigade(r->output_filters, ob);
|
|
|
008793 |
if (rv != APR_SUCCESS) {
|
|
|
008793 |
break;
|
|
|
008793 |
@@ -626,7 +633,7 @@
|
|
|
008793 |
* but that could be a huge amount of data; so we pass
|
|
|
008793 |
* along smaller chunks
|
|
|
008793 |
*/
|
|
|
008793 |
- if (script_error_status == HTTP_OK) {
|
|
|
008793 |
+ if (script_error_status == HTTP_OK && !ignore_body) {
|
|
|
008793 |
rv = ap_pass_brigade(r->output_filters, ob);
|
|
|
008793 |
if (rv != APR_SUCCESS) {
|
|
|
008793 |
break;
|