mod_proxy (rev proxy): Don"t set Content-Type if remote server

mod_proxy (rev proxy): Don"t set Content-Type if remote server

am 28.01.2010 02:57:03 von Ray Van Dolson

I'm trying to troubleshoot a Nokia E71x having problems connecting to
our OWA server via an Apache 2.2.13 reverse proxy.

As part of the troubleshooting, I noticed that in response to a Sync
request (all done via HTTP/1.1 btw), we recieve a response from the OWA
server with the following HTTP characteristics:

HTTP/1.1 200 OK
Content-Encoding: gzip
Vary: Accept-Encoding
Transfer-Encoding: chunked



However, when Apache transmits this back to the client, the response
looks like this:

HTTP/1.1 200 OK
Date: Thu, 28 Jan 2010 01:18:30 GMT
Content-Encoding: gzip
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/plain; charset=UTF-8



I have tested with and without the Apache server in the middle, and
only get errors on the Nokia with the proxy in place. The above packet
is the only difference I can detect between the two.

(The Nokia device doesn't appear to sync at all if I force HTTP/1.0 as
it always tranmits an "Expect: 100-continue" header and this elicits a
"go away" response from the Apache server as this isn't valid for
HTTP/1.0 -- basically we're dealing with a broken HTTP client on the
Nokia)

I'd like to tell Apache to *not* insert the extra headers if they're
not in the packet coming from the IIS server... I don't care so much
about the Date header, but I really want to strip out the Content-Type
header....

Obviously I could do something like the following:


ProxyPass https://owa.esri.com/Microsoft-Server-ActiveSync
ProxyPassReverse https://owa.esri.com/Microsoft-Server-ActiveSync
Header unset Content-Type


However, this strips out the Content-Type for *all* requests. I just
want to leave the response packet alone and not add the Content-Type
header if it's missing.

I don't see a way to base a Header unset on a environment variable
(apparently this is only for the "set", "echo" keywords).

I might be able to limit the scope of the Header unset by doing some
mod_rewrite trickery if I can track down the exact type of ActiveSync
request that triggers this particular response..... I'd rather have a
more general solution though.

Any ideas?

Thanks,
Ray

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: mod_proxy (rev proxy): Don"t set Content-Type ifremote server doesn"t set it

am 28.01.2010 12:38:52 von Nick Kew

On 28 Jan 2010, at 01:57, Ray Van Dolson wrote:

> I'd like to tell Apache to *not* insert the extra headers if they're
> not in the packet coming from the IIS server... I don't care so much
> about the Date header, but I really want to strip out the Content-Type
> header....

See the DefaultType directive.

--
Nick Kew

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: mod_proxy (rev proxy): Don"t set Content-Type if

am 28.01.2010 18:21:20 von Ray Van Dolson

On Thu, Jan 28, 2010 at 03:38:52AM -0800, Nick Kew wrote:
>
> On 28 Jan 2010, at 01:57, Ray Van Dolson wrote:
>
> > I'd like to tell Apache to *not* insert the extra headers if they're
> > not in the packet coming from the IIS server... I don't care so much
> > about the Date header, but I really want to strip out the Content-Type
> > header....
>
> See the DefaultType directive.
>

Thanks for the pointer. This appears to have resolved the problem.

Ray

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org