[spook-l] Refreshing JPEG snapshots

Vladimir Lasky Vladimir.Lasky at eng.uts.edu.au
Thu Jul 21 23:31:35 EDT 2005


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.

-- 
UTS CRICOS Provider Code:  00099F
DISCLAIMER: This email message and any accompanying attachments may contain
confidential information.  If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments.  If
you have received this message in error, please notify the sender 
immediately and delete this message. Any views expressed in this message 
are those of the individual sender, except where the sender expressly, and 
with authority, states them to be the views the University of Technology, 
Sydney. Before opening any attachments, please check them for viruses and 
defects.



More information about the spook-l mailing list