The Tcl proc will not change any internal setting, but I just checked
and the C code uses the same format.
I also used telnet to grab a page from my server running 4.5.0:
t...@boron:~$ telnet rmadilo.com 80
Trying 216.211.130.179...
Connected to rmadilo.com.
Escape character is '^]'.
GET /time.tcl HTTP/1.1
Host: rmadil.com
HTTP/1.1 200 OK
Set-Cookie: SessionID = "6FDD1A4E5EAAF77558F322F3EE041877CB8CFFC2" ;
Max-Age = 809326240 ; Path=/
Set-Cookie2: SessionID = "6FDD1A4E5EAAF77558F322F3EE041877CB8CFFC2" ;
Max-Age = 809326240 ; Path=/ ; Version = 1
MIME-Version: 1.0
Date: Sat, 09 May 2009 20:09:20 GMT
Server: AOLserver/4.5.0
Content-Type: text/plain; charset=UTF-8
Content-Length: 78
Connection: close
time = Sat, 09 May 2009 20:09:20 GMT
zero time = Thu, 01 Jan 1970 00:00:00 GMT
Trying a static file to get a last-modified header:
t...@boron:~$ telnet rmadilo.com 80
Trying 216.211.130.179...
Connected to rmadilo.com.
Escape character is '^]'.
GET /file-time.txt HTTP/1.1
Host: rmadilo.com
HTTP/1.1 200 OK
Set-Cookie: SessionID = "9BD7C5235E14849FB2F81E29510291BD00436734" ;
Max-Age = 809326035 ; Path=/
Set-Cookie2: SessionID = "9BD7C5235E14849FB2F81E29510291BD00436734" ;
Max-Age = 809326035 ; Path=/ ; Version = 1
Last-Modified: Sat, 09 May 2009 20:11:48 GMT
MIME-Version: 1.0
Date: Sat, 09 May 2009 20:12:45 GMT
Server: AOLserver/4.5.0
Content-Type: text/plain; charset=UTF-8
Content-Length: 41
Connection: close
when was this static file last modified?
I'm wondering how your header is generated?
tom jackson
On Sat, 2009-05-09 at 22:21 +0400, Alexey Pechnikov wrote:
> Hello!
>
> On Saturday 09 May 2009 20:11:11 Tom Jackson wrote:
> > You can use this as a temporary replacement:
> >
> > proc ::ns_httptime { seconds } {
> >
> > return [clock format $seconds -format "%a, %d %b %Y %H:%M:%S %Z" -gmt 1]
> >
> > }
>
> Tnx, but AOL internals set wrong header again
> Last-Modified: Sat, 9 May 2009 18:07:40 GMT
>
> I did find this error by testing AOL internal caching.
>
> My custom cache function doesn't have the problem:
>
> set mtime [file mtime $fname]
>
> ... create gzipped version in cache if needed ...
>
> set none_header [ns_set iget [ns_conn headers] If-None-Match]
> set none_header [clock scan $none_header]
> set since_header [ns_set iget [ns_conn headers] If-Modified-Since]
> set since_header [clock scan $since_header]
> if {$none_header == $mtime || $since_header == $mtime} {
> ns_return 304 {} {}
> return
> }
>
> ... return original or gzipped file ...
>
>
> Best regards, Alexey Pechnikov.
> http://pechnikov.tel/
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to
> <[email protected]> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
> field of your email blank.
>
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
<[email protected]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.