Re: A question about the request line and the referer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



André,

A better way to ask my question maybe like this:

Some referer pages are "-",  some are other pages in the same website,
and still some are pages of other website. If I want to find the
users' request history (visiting history), could I just ignore the
referer page but only check the request page?

Btw, why the referer pages are different, like what I asked above,
some are "-", some are other pages in either the same or different
websites?

Thanks,
Paul

On Sat, Aug 2, 2008 at 5:53 AM, André Warnier <aw@xxxxxxxxxx> wrote:
> Paul Li wrote:
> [...]
>>
>> My question is that, the resource in the request line,
>> /finger-pulse-oximeter-octivetech-300c-p-37.html?osCsid=ddd, is
>> actually a web page, but why the referer, http://www.ddd.ddd.dd/ , is
>> another page?
>>
> Try the following experiment :
> In your browser, call up the URL "www.google.com".
> Then, when that page is displayed, overwrite "www.google.com" and manually
> call up a URL on your server.
> Then check your access log.
> You may find that the access to your own page is shown with the referrer
> "http://www.google.com";.
>
> The point is, the server does not really know from which page, a page on
> your server is being called. It knows from which IP address it receives the
> request, but not from which page (and it does not have to be a page).
> So, in order to store the "referer" in the access log, it accepts whatever
> the browser (or other program) which accesses the current page, is
> specifying in the "Referer:" header that comes with the current request.  If
> the browser (or other program) sends a request to your server, and adds a
> "Referer:" header containing "Planet Mars", then that is what your server
> will put in the access log.
>
> Example :
> 192.168.250.152 - - [02/Aug/2008:11:44:21 +0200] "GET / HTTP/1.1" 200 2355
> "Planet Mars" "lwp-request/2.08"
>
> The above line of access.log was obtained as follows :
> Along with perl, comes a very handy command-line program named
> "lwp-request", which allows one to compose a HTTP request to a HTTP server,
> specify exactly which headers are being sent, and look at the exact response
> sent by the server (headers and all).
> The command I used was :
>
> lwp-request -Sed -m GET -H "Referer: Planet Mars" "http://localhost";
>
> (the "-H" option allows to manually add a HTTP header to the request)
>
> André
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux