httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <>
Subject Re: Bug report
Date Wed, 26 Apr 1995 19:20:28 GMT
On Wed, 26 Apr 1995, Rob Hartill wrote:
> > the
> > bug surfaces when the index.cgi just does a redirection by printing a 
> > location header: it will prepend content-type: application/x-httpd-cgi
> > to screw up every browser in sight. 
> Oh, hang on, having read that again, I think I misuderstood the
> problem the first time.
> Is it that non ScriptAlias'ed .cgi scripts send back their own 
> special Content-type: ? which then overrides the Content-type of
> the document being redirected to ?

Well, it should be a cardinal rule that no client ever sees the 
application/x-httpd-cgi mime type.

I think the semantics are that all CGI scripts are responsible for 
proper content-type lines, except that scripts returning just Location: 
don't have to have a content-type associated with it.  

>From, it looks like all a valid 
script has to return is Location: and the server will handle the rest, 
maybe adding a default Content-type if none was served.

>From imagemap.c (both the stock one and the one I've been working with):

sendmesg(char *url) {
    printf("Location: %s%c%c",url,10,10);
    printf("This document has moved <A HREF=\"%s\">here</A>%c",url,10); 


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--  http://www.[hyperreal,organic].com/

View raw message