You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by ra...@bellglobal.com on 1996/08/22 20:59:05 UTC

Apache sends two content-types?

>From within a module, I set the request status to 401 and the status
string to "Unauthorized", the WWW-authenticate header to something and 
the content-type to "text/html".  When I return this to Apache, Apache
sends the following:

HTTP/1.0 401 Unauthorized
Date: Thu, 22 Aug 1996 18:41:47 GMT
Server: Apache/1.1.1
Content-type: application/x-httpd-php
WWW-authenticate:  basic realm="ISP Database"
Content-type:  text/html

Note the space in front of text/html in the second content-type.
Is this an Apache bug, or do I need to do something trickier in order
to force authentication from a module?  

It is interesting to note that most browsers ignore the first content-type
and happily treat the output as text/html.  The exception is of course
MSIE which takes the first content type and pops up an unknown type/save to 
disk window.

-Rasmus