httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@worldgate.com>
Subject Re: Location: header and CGI specy
Date Mon, 18 Aug 1997 18:18:18 GMT
That is almost what I was thinking, but am not sure I quite buy that.
Yes, it is probably the correct answer but it doesn't entirely strike me
as right.

The status header isn't defined as changing the behavior at all.  In
theory, a:

     Status: 301 Moved Permanently

should result in the exact same output as a script without one.  However,
if you have a 200 or something then it should obviously not add its own
body.  Yes, the way it is done is probably best overall, but...

It is all, of course, due to the CGI standard or lack thereof.

On Mon, 18 Aug 1997, Alexei Kosut wrote:

> On Sun, 17 Aug 1997, Dean Gaudet wrote:
> 
> > Looks like a bug to me.
> 
> I suspect not. Apache only deals with the Location: header if there is no
> Status: header. It always has, as have all the other CGI implementations
> that existed prior to Apache (NCSA and CERN - I don't know what more
> recent servers do).
> 
> See, if you get headers as Marc shows, "Apache" does not return a
> redirect. The CGI returns a redirect. In other words, Apache does not
> parse Location, it does not provide a body, the CGI has to do all
> that. And Apache doesn't know that "/foo/" isn't a valid response for
> Location in whatever context the CGI is speaking to the browser.
> 
> Without Status:, Apache handles the redirect for the CGI, expanding it
> (or doing an internal redirect), providing a body, etc... But it
> shouldn't do that if the CGI has told Apache it can take care of itself.
> 
> > On Sun, 17 Aug 1997, Marc Slemko wrote:
> > 
> > > 	Status: 302 goober
> > > 	Location: /foo/
> > > 
> > > then Apache returns a redirect with /foo/.  That is invalid according
> > > to the spec, no?  Apache needs to either qualify it or handle it
> > > internally, no?
> > 
> > 
> 
> -- Alexei Kosut <akosut@organic.com>
> 


Mime
View raw message