Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1193860

Summary: mod_proxy: empty reply from server
Product: Red Hat Software Collections Reporter: Ondřej Pták <optak>
Component: httpdAssignee: Jan Kaluža <jkaluza>
Status: CLOSED ERRATA QA Contact: Ondřej Pták <optak>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: httpd24   
Target Milestone: rc   
Target Release: 2.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-31 10:15:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed patch none

Description Ondřej Pták 2015-02-18 12:43:03 UTC
Description of problem:
mod_proxy returns empty reply if server behind proxy doesn't return anything (probably timeout). In this case, httpd24-httpd-2.4.6-25.el7 returned html page with description:
(...)
<title>500 Internal Server Error</title>
(...)

Version-Release number of selected component (if applicable):
httpd24-httpd-2.4.12-4.el7 (probably the same problem on el6)

How reproducible:
always

Steps to Reproduce:
0. setenforce 0
1. cat << EOF > /opt/rh/httpd24/root/etc/httpd/conf.d/wstunel.conf
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so

ProxyTimeout 2
SSLProxyEngine on
<Location /test/>
    ProxyPass https://localhost:8080/
    ProxyPassReverse https://localhost:8080/
    ProxyPass wss://localhost:8080/
    ProxyPassReverse wss://localhost:8080/
</Location>
EOF
2. nc -l 8080 < /dev/null > output&
3. systemctl start httpd24-httpd
4. curl -v --insecure https://127.0.0.1/test/
5. remove conf file, kill processes, setenforce 1

Actual results:
(...)
> GET /test/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 127.0.0.1
> Accept: */*
> 
* Empty reply from server
* Connection #0 to host 127.0.0.1 left intact
curl: (52) Empty reply from server

Expected results:
some reply explaining what happened instead of empty reply

Additional info:
in older version there was this reply:
> GET /test/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 127.0.0.1
> Accept: */*
> 
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at 
 root@localhost to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
* Connection #0 to host 127.0.0.1 left intact

Comment 2 Jan Kaluža 2015-03-17 11:39:19 UTC
Created attachment 1002768 [details]
proposed patch

Comment 7 errata-xmlrpc 2016-05-31 10:15:50 UTC
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://access.redhat.com/errata/RHBA-2016:1154