Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Cause: mod_dav did not set the status line of the response.
Consequence: Responses sent by mod_dav has been terminated right after the "<title>" tag in their body.
Fix: Status line is set properly for mod_dav responses.
Result: Responses are not terminated prematurely anymore.
Created attachment 1042789[details]
Proposed patch
Description of problem:
When a file is uploaded to Apache server via mod_dav, the response body sent by server is incomplete.
Version-Release number of selected component (if applicable):
httpd-2.4.6-34.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
# cat > /etc/httpd/conf.d/dav.conf <<EOF
DavLockDB /tmp/davlock
<Directory /var/www/html/webdav>
Dav On
</Directory>
EOF
# mkdir /var/www/html/webdav
# chown apache:apache /var/www/html/webdav
# setsebool httpd_unified on
# systemctl start httpd
# echo test | curl -v -T - http://localhost/webdav/newfile
Actual results:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>
Expected results:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>201 Created</title>
</head><body>
<h1>Created</h1>
<p>Resource /webdav/newfile has been created.</p>
</body></html>
Additional info:
This issue is not present in httpd 2.2 on RHEL 6, which made me wonder what makes the difference. It turns out that in httpd-2.2.15-45.el6.x86_64 there is an extra line in modules/dav/main/mod_dav.c, function dav_error_response(), with a funny comment:
317 /* ### I really don't think this is needed; gotta test */
318 r->status_line = ap_get_status_line(status);
When returning this line where it originally was, the server sends a full response body.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2015-2194.html