Re: [squid-users] suggestions on my redirector code

This is a discussion on Re: [squid-users] suggestions on my redirector code within the Squid Users forums, part of the Web Server and Related Forums category; On Monday 11 August 2003 21.26, theresa.hilding@gcmail.maricopa.edu wrote: > don't know where to go ...


Go Back   Usenet Forums > Web Server and Related Forums > Squid Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-11-2003
Henrik Nordstrom
 
Posts: n/a
Default Re: [squid-users] suggestions on my redirector code

On Monday 11 August 2003 21.26, theresa.hilding@gcmail.maricopa.edu
wrote:

> don't know where to go from here. For example, should I redirect
> GET requests only?


Sounds like a safe bet. POST requests are tricky, and redirecting a
HEAD request probably won't be understood well by the clients using
HEAD requests..

> Is there a more efficient way to update a file's
> modification date than using system("touch <fn>")?


Just open the file for writing, and then immediately close it again.
This is essentially what touch does.

int fd;

fd = open(filename, O_CREAT|O_WRONLY);
close(fd);

> I have chosen to use file modification dates to determine the last
> time an ip address issued an http request. The filename is the ip
> address. This seems to work well for my environment with less than
> 200 users.


Should work well for the purpose.

Filesystems are an often underestimated database resource.

Regards
Henrik

--
Donations welcome if you consider my Free Squid support helpful.
https://www.paypal.com/xclick/busine...quid-cache.org

If you need commercial Squid support or cost effective Squid or
firewall appliances please refer to MARA Systems AB, Sweden
http://www.marasystems.com/, info@marasystems.com
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:24 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0