https://bz.apache.org/bugzilla/show_bug.cgi?id=65631
Bug ID: 65631 Summary: Proxy CONNECT error 500 Product: Apache httpd-2 Version: 2.4.51 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: mod_proxy_connect Assignee: bugs@httpd.apache.org Reporter: pa...@verotel.cz Target Milestone: --- Created attachment 38066 --> https://bz.apache.org/bugzilla/attachment.cgi?id=38066&action=edit Patch for this bug Hi, I was getting lots of code 500 for CONNECT method in my proxy access log and very long lasting requests in server-status lately. I tried to dig a little bit so you can check end of debug/trace output of one such request (ip addresses and server name were obfuscated, sorry): ... proxy_util.c(4909): [client AB.XYZ.48.134:9045] proxy: CONNECT: #0: origin: 1/31 proxy_util.c(4810): [client AB.XYZ.48.134:9045] proxy: CONNECT: origin input ready proxy_util.c(4644): [client AB.XYZ.48.134:9045] ap_proxy_transfer_between_connections complete (from AB.XYZ.49.14:443) proxy_util.c(4878): [client AB.XYZ.48.134:9045] proxy: CONNECT: polling (client=31, origin=31) proxy_util.c(4902): [client AB.XYZ.48.134:9045] AH10215: proxy: CONNECT: woken up, 1 result(s) proxy_util.c(4909): [client AB.XYZ.48.134:9045] proxy: CONNECT: #0: origin: 1/31 proxy_util.c(4810): [client AB.XYZ.48.134:9045] proxy: CONNECT: origin input ready proxy_util.c(4644): (70014)End of file found: [client AB.XYZ.48.134:9045] ap_proxy_transfer_between_connections complete (from AB.XYZ.49.14:443) proxy_util.c(4838): [client AB.XYZ.48.134:9045] proxy: CONNECT: origin read shutdown proxy_util.c(4878): [client AB.XYZ.48.134:9045] proxy: CONNECT: polling (client=35, origin=0) proxy_util.c(4902): [client AB.XYZ.48.134:9045] AH10215: proxy: CONNECT: woken up, 1 result(s) proxy_util.c(4909): [client AB.XYZ.48.134:9045] proxy: CONNECT: #0: client: 4/35 proxy_util.c(4943): [client AB.XYZ.48.134:9045] proxy: CONNECT: client output ready proxy_util.c(4966): [client AB.XYZ.48.134:9045] proxy: CONNECT: client write shutdown proxy_util.c(4878): [client AB.XYZ.48.134:9045] proxy: CONNECT: polling (client=31, origin=0) proxy_util.c(4902): [client AB.XYZ.48.134:9045] AH10215: proxy: CONNECT: woken up, 1 result(s) proxy_util.c(4909): [client AB.XYZ.48.134:9045] proxy: CONNECT: #0: client: 31/31 proxy_util.c(4810): [client AB.XYZ.48.134:9045] proxy: CONNECT: client input ready proxy_util.c(4544): (104)Connection reset by peer: [client AB.XYZ.48.134:9045] AH03308: ap_proxy_transfer_between_connections: error on client - ap_get_brigade proxy_util.c(4644): (104)Connection reset by peer: [client AB.XYZ.48.134:9045] ap_proxy_transfer_between_connections complete (to AB.XYZ.49.14:443) The point is that the proxy got 'End of file found' but tried to continue. I'm not sure if it's not obsolete, but RFC2817 says: 5.3 Establishing a Tunnel with CONNECT ... If at any point either one of the peers gets disconnected, any outstanding data that came from that peer will be passed to the other one, and after that also the other connection will be terminated by the proxy. If there is outstanding data to that peer undelivered, that data will be discarded. Therefore I tried to apply simple and ugly hack and the strangest thing has happend. It seems to change those pesky 500 to 200 and I don't see any hanging connections anymore. Can somebody check attached patch and write me what he or she thinks of it please? Thanks, Pavel Mateja -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: bugs-unsubscr...@httpd.apache.org For additional commands, e-mail: bugs-h...@httpd.apache.org