A request's Origins

2001-11-21 Thread Rasoul Hajikhani

Hello folks,
I am trying to find out where (which machine) a request has come from.
We have several web servers running on different machines serving
different documents, so it is possible to jump servers back and forth.
This means that I would have to know what prev-uri was/is and what
r-uri was/is. The problem is that if the request object is the original
one, not a redirect or ErrorDocument handler r, the r-prev returns
undef. Jumping from one server to another is not a redirect (in my
case), so r-prev returns undef every time. Any ideas?

Also, has any one encountered an error using MLDBM::Sync saving to an
NFS mounted file?

Appreciate all comments.
Thanks in advance
-r



RE: A request's Origins

2001-11-21 Thread Andy Sharp

If you're simply looking for which link they clicked on to bring them to
this particular page/screen; it should be stored in $ENV{HTTP_REFERER}

Also:
my $prev_page = $r-header_in(Referer);  #
http://www.someplace.com/withalinktohere.html

--A

 Hello folks,
 I am trying to find out where (which machine) a request has 
 come from. We have several web servers running on different 
 machines serving different documents, so it is possible to 
 jump servers back and forth. This means that I would have to 
 know what prev-uri was/is and what
 r-uri was/is. The problem is that if the request object is 
 the original
 one, not a redirect or ErrorDocument handler r, the r-prev 
 returns undef. Jumping from one server to another is not a 
 redirect (in my case), so r-prev returns undef every time. Any ideas?





Re: A request's Origins

2001-11-21 Thread Randal L. Schwartz

 Andy == Andy Sharp [EMAIL PROTECTED] writes:

Andy If you're simply looking for which link they clicked on to bring them to
Andy this particular page/screen; it should be stored in $ENV{HTTP_REFERER}

Unless that value is wrong (sometimes), faked (possibly), or stripped
(by a security-conscious user, browser, or gateway).

REFERER is just a hint.  Trust it about as far as you can throw
your computer.  Laptops don't count. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!