httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@organic.com>
Subject Re: 0.7.2b
Date Wed, 07 Jun 1995 21:48:30 GMT
On Wed, 7 Jun 1995, Robert S. Thau wrote:
>    Also, where is the if-modified-since date passed along to the CGI 
>    script?  I can't seem to find it in any environment variable.... 
> 
> HTTP_IF_MODIFIED_SINCE, *if* it was supplied by the client.  (If not,
> the server does not supply a default, so you won't see it if you just
> telnet in to the script).

That's what I would have thought, but for some reason it doesn't seem to 
be working... i.e., I hit

http://www.apache.org/cgi-bin/printenv

the first time I don't see it, but I would expect to see it a second time 
(have my cache preferences in netscape set to "once per session").  Hmmm...

>    Could you turn on reverse-DNS lookups only when it's needed for protected 
>    areas?
> 
> One useful approach is to use lazy evaluation --- have a slot in the
> per-request data structures which contains the result of the reverse
> DNS lookup if needed, and have anything that cares about the hostname
> do something like:
> 
>    find_remote_host (request);
> 
> which just returns what's in the per-request data structure if
> something is there, and actually does the lookup if not (cacheing it
> in the per-request data structure for future lookups).  

That's the right way.

> I believe John
> Franks' WN does something like this.

The only thing I remember being discussed on WN-MAINT was having WN do 
the reverse DNS lookups for the logging purposes *after* the document had 
been served.  

> WN is worth a look, BTW --- the latest release has an interesting new
> twist on server-side includes: conditional text, with (believe it or
> not) an <!-- if --> <!-- then --> <!-- else --> syntax.  This sort
of
> thing really gives me the willies --- it gives SSI a firm shove down
> the slippery slope towards full scripting, in a way which won't look
> pretty when it gets to the bottom --- but a whole lot of people are
> likely to want it nonetheless.

I totally agree - however, there aren't variables in the CGI environment 
to do exacty what those accomplish, so CGI would have to be extended (and 
a very quick tutorial on Perl written), but extending CGI is a lot less 
controversial than extending SSI's.

	Brian

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


Mime
View raw message