--- file_not_specified_in_diff +++ file_not_specified_in_diff @@ -, +, @@ --- modules/proxy/mod_proxy_ftp.c.orig 2012-12-05 07:22:05.000000000 -0600 +++ modules/proxy/mod_proxy_ftp.c.bugfixchanges 2012-12-05 12:41:21.000000000 -0600 @@ -1909,6 +1909,38 @@ rc = proxy_ftp_command(NULL, r, origin, bb, &ftpmessage); apr_brigade_cleanup(bb); + /* ----------------------------------------------------------------- + * Need to deal with '426' from FTP: + * + * responses: 426 + * + * 426 Failure writing network stream + * + * Use case: Seems to happen when a user cancels a download proxied + * through an FTP server with mod_proxy. I think the initial problem + * occurs up above at line 1630 where the HTTP retval gets set to + * 'HTTP_OK' (200 OK) automatically and IMHO shouldn't log a '200' in + * the access_log as so. + * + * This is the last where the last and final response from the FTP + * server gets handled, so we should do something with it and at least + * log it properly. + * + * '499' HTTP_CLIENT_CLOSED_REQUEST is an Nginx HTTP1/1 retval, not + * specifically outlined in the RFC 2616. I thought it was applicable + * and did add it to include/httpd.conf + * + * Adam Dosch - 12/5/2012 + * + */ + + if (rc == 426 ) { + r->status = HTTP_CLIENT_CLOSED_REQUEST; + r->status_line = "499"; + } + + /* ----------------------------------------------------------------- */ + /* * VII: Clean Up ------------- *