You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jonathan Gutow <gu...@uwosh.edu> on 2009/01/09 18:27:47 UTC

[users@httpd] Why is my gateway/reverse proxy forcing Content-Type: text/plain in header?

I have the following very simple gateway set up.  For some reason I  
am getting the field
Content-Type: text/plain
added to the HTTP header.  Thus pages served through the apache  
gateway display the source code rather than displaying as html.

I'm also confused by why the "Header always unset Content-Type"  
doesn't cure my problem.  I thought it should strip out all  
occurrences of "Content-Type". As you can see from the commented out  
lines below, I also tried a simple rewrite rule.  I assume I'm making  
a silly mistake.  Can anybody  help me spot it?

Thanks,
Jonathan
-------proxy part of config file------
#gateway to sage
ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On

<Proxy *>
     Order deny,allow
     Allow from all
</Proxy>

ProxyPass /sage http://127.0.0.1:8000
ProxyPassReverse /sage http://127.0.0.1:8000
Header always unset Content-Type

#RewriteEngine On
#RewriteRule ^/sage(.*)$ http://127.0.0.1:8000$1 [P,T=text/html]
---------------------------

                          Dr. Jonathan H. Gutow
Chemistry Department                                 gutow@uwosh.edu
UW-Oshkosh                                           Office:920-424-1326
800 Algoma Boulevard                                 FAX:920-424-2042
Oshkosh, WI 54901
                  http://www.uwosh.edu/faculty_staff/gutow/





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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: [users@httpd] Why is my gateway/reverse proxy forcing Content-Type: text/plain in header?

Posted by Eric Covener <co...@gmail.com>.
On Fri, Jan 9, 2009 at 2:38 PM, Jonathan Gutow <gu...@uwosh.edu> wrote:
> Nick,
>        Thanks.  That did solve the problem.  However, I still do not
> understand why the "Header" directive alone does not work.

Maybe this phrase could use a wording tweak:

Except in early mode, the Header directives are processed just before
the response is sent to the network. These means that it is possible
to set and/or override most headers, except for those headers added by
the header filter.

where "added by the header filter" usually means "all the interesting ones"

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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: [users@httpd] Why is my gateway/reverse proxy forcing Content-Type: text/plain in header?

Posted by Jonathan Gutow <gu...@uwosh.edu>.
Nick,
	Thanks.  That did solve the problem.  However, I still do not  
understand why the "Header" directive alone does not work.

Jonathan
On Jan 9, 2009, at 1:12 PM, Nick Kew wrote:

> Jonathan Gutow wrote:
>> I have the following very simple gateway set up.  For some reason  
>> I am getting the field
>> Content-Type: text/plain
>> added to the HTTP header.  Thus pages served through the apache  
>> gateway display the source code rather than displaying as html.
>
> DefaultType None
>
> See also https://issues.apache.org/bugzilla/show_bug.cgi?id=13986
>
> -- 
> Nick Kew
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server  
> Project.
> See <URL:http://httpd.apache.org/userslist.html> 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
>

                          Dr. Jonathan H. Gutow
Chemistry Department                                 gutow@uwosh.edu
UW-Oshkosh                                           Office:920-424-1326
800 Algoma Boulevard                                 FAX:920-424-2042
Oshkosh, WI 54901
                  http://www.uwosh.edu/faculty_staff/gutow/





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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: [users@httpd] Why is my gateway/reverse proxy forcing Content-Type: text/plain in header?

Posted by Nick Kew <ni...@webthing.com>.
Jonathan Gutow wrote:
> I have the following very simple gateway set up.  For some reason I am 
> getting the field
> Content-Type: text/plain
> added to the HTTP header.  Thus pages served through the apache gateway 
> display the source code rather than displaying as html.

DefaultType None

See also https://issues.apache.org/bugzilla/show_bug.cgi?id=13986

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> 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