Bug 56823 - returning 200 status when ap_get_brigade failed
Summary: returning 200 status when ap_get_brigade failed
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy_ajp (show other bugs)
Version: 2.4.10
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Keywords: FixedInTrunk
Depends on:
Reported: 2014-08-07 08:37 UTC by Yoshiharu Mori
Modified: 2015-06-27 07:22 UTC (History)
1 user (show)

patch for httpd 2.4.10 (506 bytes, text/plain)
2014-08-07 08:37 UTC, Yoshiharu Mori

Note You need to log in before you can comment on or make changes to this bug.
Description Yoshiharu Mori 2014-08-07 08:37:43 UTC
Created attachment 31884 [details]
patch for httpd 2.4.10

When ap_get_brigade failed ,return value of ap_proxy_ajp_request was not set.
(return default value 0 and write access log with status 200).

I checked mod_proxy_http, when ap_get_brigade failed, return value was set to HTTP_BAD_REQUEST and write access log with status 400.

This patch is set return value of ap_proxy_ajp_request to HTTP_BAD_REQUEST
when ap_get_brigate failed.

See also. http://mail-archives.apache.org/mod_mbox/httpd-users/201407.mbox/browser [users@httpd] 200 OK for a network error?
Comment 1 Yann Ylavic 2014-12-07 21:35:47 UTC
Thanks for the patch.

A more complete one has been committed to trunk in r1643537 and r1643543, taking care of not writing to the client's connection if it was aborted or if it's too late.

Can you verify r1643537 works for you? (the second commit is just a log level adjustement, not really needed for the test).
Comment 2 Yoshiharu Mori 2014-12-08 08:28:30 UTC
Thanks for your reply.

I applied your patch to my http 2.4.10.
I check uploading large file  and aborting client conection , 
I'm now getting the HTTP 408 status.(It's more better)

It's working as I expected. 
The second patch is nice too. 

Thank you very match.
Comment 3 Yann Ylavic 2014-12-08 14:58:19 UTC
Thanks for testing, backport to 2.4.x proposed in r1643831.
Comment 4 Christophe JAILLET 2015-06-27 07:22:26 UTC
This is part of the (unreleased) 2.4.13
backport in r1682544