You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Adam <mi...@gmail.com> on 2015/12/07 20:03:01 UTC

[users@httpd] mod_proxy - Status lines without response phrases are getting turned into 500 errors

Hi,

We are using Apache 2.2.29 in production with mod_perl and mod_proxy (we're
acting as a reverse proxy) and are experiencing a problem with proxying
responses from the back end server that don't include a response phrase
being turned into a 500 error by Apache when it proxies to the client.  The
client is using a custom response code of 320 and is not including a
response phrase in their status line.  This sounds almost identical to an
old bug that was fixed (or supposedly fixed) a very long time ago:

https://bz.apache.org/bugzilla/show_bug.cgi?id=44995

In our mod_perl application if we modify the status line read from the
backend server to include a response phrase then this avoids the bug.
E.g., things are ok if we do something like this when the status line
doesn't contain a response phrase.

$r->status_line($r->status . ' OK');

Does anyone have any experience with this or should I file a new bug with
Apache?

Here is some diag info from the httpd binary:

Loaded Modules:
 core_module (static)
 authn_file_module (static)
 authn_default_module (static)
 authz_host_module (static)
 authz_groupfile_module (static)
 authz_user_module (static)
 authz_default_module (static)
 auth_basic_module (static)
 file_cache_module (static)
 cache_module (static)
 disk_cache_module (static)
 reqtimeout_module (static)
 filter_module (static)
 deflate_module (static)
 log_config_module (static)
 env_module (static)
 headers_module (static)
 setenvif_module (static)
 version_module (static)
 proxy_module (static)
 proxy_http_module (static)
 proxy_scgi_module (static)
 proxy_ajp_module (static)
 proxy_balancer_module (static)
 ssl_module (static)
 mpm_prefork_module (static)
 http_module (static)
 mime_module (static)
 status_module (static)
 actions_module (static)
 alias_module (static)
 so_module (static)

Server version: Apache/2.2.29 (Unix)
Server built:   Oct 17 2014 13:47:09
Server's Module Magic Number: 20051115:36
Server loaded:  APR 1.5.1, APR-Util 1.5.3
Compiled using: APR 1.5.1, APR-Util 1.5.3
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/var/httpd"
 -D SUEXEC_BIN="/var/httpd/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

Thanks,
Adam

Re: [users@httpd] mod_proxy - Status lines without response phrases are getting turned into 500 errors

Posted by Adam <mi...@gmail.com>.
Thanks Nick!  I'm not sure what our plans are to upgrade, but we do have an
easy fix in our application for now.  Thanks for clarifying where it was
fixed and not fixed.

Adam

On Mon, Dec 7, 2015 at 2:34 PM, Nick Kew <ni...@webthing.com> wrote:

> On Mon, 2015-12-07 at 14:03 -0500, Adam wrote:
> > We are using Apache 2.2.29 in production with mod_perl and mod_proxy
>
> What's the role of mod_perl in your proxy?  Can the
> problem be replicated without mod_perl?
>
> Oh, right, just looked up the bug you reference: seems
> I was there.  The final comment suggests that the issue
> you describe was fixed in 2.3/2.4, but not in 2.2.
> You could presumably apply the patch attached to that
> bug report if you don't want to upgrade?
>
> --
> Nick Kew
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] mod_proxy - Status lines without response phrases are getting turned into 500 errors

Posted by Nick Kew <ni...@webthing.com>.
On Mon, 2015-12-07 at 14:03 -0500, Adam wrote:
> We are using Apache 2.2.29 in production with mod_perl and mod_proxy

What's the role of mod_perl in your proxy?  Can the
problem be replicated without mod_perl?

Oh, right, just looked up the bug you reference: seems
I was there.  The final comment suggests that the issue
you describe was fixed in 2.3/2.4, but not in 2.2.
You could presumably apply the patch attached to that
bug report if you don't want to upgrade?

-- 
Nick Kew


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org