You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@avron.ICS.UCI.EDU> on 1995/03/03 00:31:02 UTC

Re: expires and doit

> We can define a special file type (or group of types) that
> relate to documents which can be treated as if they were
> the output of a cgi-script, so for example, a gif image could
> be embedded into a new file, which contained the HTTP headers
> the user wants sent back to the client. This method requires
> no special file containing headers, so there's no additional
> overhead to go look for it.
> As "cgi-output", httpd will only add its 3 or 4 standard
> headers if they are missing.
> 
> The only drawback I see is that the file will no longer be
> a .gif or whatever, which might mean that providers have to
> maintain two copies - for web and non-web applications.

I would prefer separate files, since dual-use of system objects
is an important aspect of the Web.  For example, note that my IETF
working group archives are simulataneously available via

    http://www.ics.uci.edu/pub/ietf/
     ftp://www.ics.uci.edu/pub/ietf/

and also file:///usr/spool/ftp/pub/ietf/
if you happen to be on the machine in question.

> I think someone mentioned 'fixing' the redirect on a URL
> with a missing '/'. The solution was to send back the correct
> document instead of the redirect. As Tanmoy points out, this
> will break relative URLs. The client thinks the base url is
>   http://x.y.z/blah
> but the document is actually
>   http://x.y.z/blah/
> A relative URL of x will point to   
>   http://x.y.z/x 
> instead of 
>   http://x.y.z/blah/x
> 
> However, I believe there's a HTTP response which can be attached to
> a URL to say "here's the document, but the correct URL is ..."
> See http://info.cern.ch/hypertext/WWW/Protocols/HTTP/HTRESP.html
> and "301 Moved"

That is a redirect.

HTTP/1.1 will include a Base: header which will allow the server
to change the Base URL without issuing a redirect. E.g.

   Base: <URL:http://www.ics.uci.edu/index.html>

.......Roy