[spook-l] Refreshing JPEG snapshots

Nathan Lutchansky lutchann at litech.org
Fri Jul 22 11:22:47 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vlad,

When I get back from OLS I need to check on this, but browsers definitely 
should not be caching the JPEG snapshot.  I'll try to figure out what's 
missing from the headers that cause this.

Thanks for the date header code, though, I'll put that into CVS.  -Nathan

On Fri, 22 Jul 2005, Vladimir Lasky wrote:

> Hi Nathan,
> 
> I decided to do my own dirty work for a change.
> 
> In http.c, I added the following to the beginning of find_http_location() in
> order to throw away any query string included in the URL:
> 
> /* replace first occurence of question mark (start of query string) with null*/
> char* querystart;
> querystart = strchr(path, '?');
> if (querystart != NULL) *querystart = 0;
> 
> Also, I tested spook for cacheability with the following tool:
> 
> http://www.ircache.net/cgi-bin/cacheability.py
> 
> It complained that the HTTP Date header was missing and that it had the
> potential to cause quirks. Just for fun, I added some code at the front of
> handle_GET() to produce this header:
> 
> /*Insert code to generate date header */
>         char datearray[50];
>         struct tm *timeptr;
>         time_t tm;
> /*end addition */
> 
>        struct http_location *loc;
> 
> /* Added for date header */
>         tm=time(NULL);
>           timeptr = gmtime(&tm);
>         strftime(datearray, 50, "%a, %d %b %Y %H:%M:%S GMT", timeptr);
> /*end addition */
> 
> and then further down below:
> 
> add_header( req->resp, "Date", datearray );
> 
> Your comments are as always most appreciated.
> 
> Regards, Vlad.
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC4Q9LTviDkW8mhycRAnGvAJ9M9UkkYBqMai1gR3LMrT75d0RJngCfRNpe
yUPbL0ibqvD3D++GCh5CnpA=
=SaqV
-----END PGP SIGNATURE-----



More information about the spook-l mailing list