httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Ho <and...@tellme.com>
Subject Re: HTTP/1.1 requests get HTTP/1.1 responses even with downgrade-1.0 (Was: force-response-1.0 ignored for HTTP/1.1 requests)
Date Thu, 06 Mar 2003 18:28:30 GMT
Hello,

JT>I went through the same test this a.m. for a customer with some device
JT>that couldn't handle chunked response. For me, using BrowserMatch to
JT>set downgrade-1.0 eliminated the use of chunking in the response.

Interesting. I confirmed on my setup that this works (answers my HTTP/1.1
query with an HTTP/1.0 request) for all incoming requests:

    BrowserMatch ^ downgrade-1.0

So I guess that is my workaround for the time being. But I'm still curious
why this presumed equivalent does not work for any incoming requests:

    SetEnv downgrade-1.0 1

I browsed through mod_setenv_if.c and it sure looks to me like the
BrowserMatch command should be functionally equivalent to the SetEnv
command (including using 1 as the true value). Indeed, the documentation
at http://httpd.apache.org/docs/env.html#special states that downgrade-1.0
and friends are "invoked by defining environment variables, typically with
BrowserMatch, though SetEnv and PassEnv could also be used."

In src/main/http_request.c, the check for downgrade-1.on line 1218 just
checks that ap_table_get(r->subprocess_env, "downgrade-1.0") is true,
which it should be in both cases. If I print out the environment in the
test CGI being invoked, in both cases I see downgrade_1_0=1. But, when I
put in some debugging statements, I see that in the BrowserMatch case,
ap_table_get(r->subprocess_env, "downgrade-1.0") == 1, but in the SetEnv
case, that same statement returns NULL.

Humbly,

Andrew

----------------------------------------------------------------------
Andrew Ho               http://www.tellme.com/       andrew@tellme.com
Engineer                    1-800-555-TELL          Voice 650-930-9062
Tellme Networks, Inc.                                 Fax 650-930-9101
----------------------------------------------------------------------


Mime
View raw message