|Summary:||PUT truncates response body; status_line appears to be (incorrectly) overridden in dav_error_response|
|Product:||Apache httpd-2||Reporter:||Johnny Fuery <jj>|
|Component:||mod_dav||Assignee:||Apache HTTPD Bugs Mailing List <bugs>|
|OS:||Mac OS X 10.1|
Description Johnny Fuery 2015-05-27 22:48:38 UTC
Given a successful PUT request in Apache 2.2.22: curl -u foo:bar -T test.docx https://drive.meruscase.com/test.docx <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>201 Created</title> </head><body> <h1>Created</h1> <p>Resource /new3.docx has been created.</p> <hr /> <address>Apache/2.2.22 (Ubuntu) Server at drive.meruscase.com Port 80</address> </body></html> -- The same request in 2.4.7: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title> Note that this is ONLY the content of the constant "DAV_RESPONSE_BODY_1", without the accompanying content as expected. -- A current (as of authoring date) review of mod_dav.c indicates this addition on line 317 From [ http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/main/mod_dav.c?revision=1665625&view=markup ] r->status_line = ap_get_status_line(status); ...which is subsequently outputted at the point of truncation. An older revision [ http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/main/mod_dav.c?revision=606693&view=markup ] ...where this issue was not present did not include this add'l line. Interim commits at some points include a comment indicating "not sure if this works, need to test" :-) Both apache builds were installed on Ubuntu LTS 12.x and 14.x, the respective "blessed" versions that ship with each OS. The issue was reproduced on a "virgin" copy of Ubuntu 14.04 with only mod_dav and mod_dav_fs installed.