On Tue, Jan 08, 2002 at 10:07:18AM -0600, Stathy G. Touloumis wrote: > > >I've just started learning modperl and I started with a simple module > >for apache httpd 1.3.22. > >This simple module (see below) sets & gets a cookie at every request. > >I thought it wasn't too difficult. I put it into the fixup phase (any > >problem with it?). > >First it seemed to work, but when I put a 'print STDERR' line in it, I > >saw that my script ran many times on one request. > > What is your interpretation of 'one' request? Remember, when requesting a > url there may be 'many' requests that go along with it for loading images > and other media. > > If you don't want to set/get cookie for every request try filtering based > on $r->content_type. But, your handler will still be called for every > request : )
Apache provides configuration tools that can help. PerlFixupHandlers can be placed within a <Location> or <LocationMatch> container. For example: <LocationMatch "^/myapp/.*html$"> will insure that your fixup handler is only called on requests that start with "/myaap/" and end with ".html". -- Paul Lindner [EMAIL PROTECTED] ||||| | | | | | | | | | mod_perl Developer's Cookbook http://www.modperlcookbook.org Human Rights Declaration http://www.unhchr.ch/udhr/index.htm