Apache mod_perl (3)
Exchange Links About this site Links to us 
|
General :: Windows :: Apache :: mod_perl
Articles:
This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.
Featured Article
Apache's access control passed multiple times during multi-part downloadsQuestion: We are using Apache and use perl module AuthCookie.pm for access control (authentication, authorization). We log all accesses into a mysql database. When users download large documents, I see multiple entries per downloaded document in our database - typically 6 to 12 entries. I see the corresponding log file entries with an http result code of 206 (partial download).
How can I log only the first of those 6 to 12 partial downloads?
Answer: From the authentication/ authorization code you have access to Apache's RequestRec object. You can see the headers there. One of the headers will be Range (in case a part of the file is requested. Look at the code below - it shows how to access the incoming headers (all of them) and in particular how to check if a request is a subsequent partial download.
 | |  | | my $headers_in = $r->headers_in();
while(my($k,$v) = each %$headers_in) {
print LOGFILE "$k = $v\n";
}
if ($r->headers_in->get('Range') eq '') {
}
| |  | |  |
|
| Most recent comments
2009-11-21 11:33:29:
by [hidden]
in Dating Scams
on Is this Russian girl scamming me? How to recognize scammers:
OK
so tell me if your 19 u cant get a girl visa to come to USA because she under 40 wow i don't wanna get a Russian girl way older then me not good is that what u trying to say that you cant get ... read more
|
2009-11-21 10:55:24:
by anonymous
in Dating Scams
on Dating scammer Natalya from Osinniki, Russia:
Frankie I do not know how to explain it, but I am glad to receive your
letter. I am glad, that you have answered me. When I was on work and
at home I all time thought, you will write to me or ... read more
|
2009-11-21 10:46:44:
by [hidden]
in Dating Scams
on Dating scammer Medlin Kassala:
Dearest Love,
I am more than happy in your reply to my mail, how is your day today i hope all is well and fine with you including your health and job. My name is Miss Eunice Dorin kassala and i am ... read more
|
2009-11-21 10:31:57:
by [hidden]
in Dating Scams
on Blacklisted Emails of Russian Dating Scammers:
> TRAVEL INFO : ELTYSHEWA MARGARITA
&g- ------------------------- ------------------------- ------------------------- ------------------------- -------------------------------------------------- ... read more
|
|
2009-11-21 10:09:07:
by mangus
in Dating Scams
on Dating scammer Elena Emyataeva:
scammer anna ogannisyan
|
2009-11-21 10:03:09:
by magnus
in Dating Scams
on Dating scammer ¡ARMENIAN CONNECTION!:
hello wan wan and venezolano.how are you?
|
2009-11-21 10:00:18:
by magnus
in Dating Scams
on Dating scammer Anna Ogannisyan:
hello wan wan.i am fine.see you soon.regards
|
2009-11-21 09:57:39:
by harleydyna1340
in Dating Scams
on Dating scammer Esther Ansomaa from Accra, Ghana:
heres a new one from russia. havent seen her yet
|
2009-11-21 09:46:11:
by magnus
in Dating Scams
on Dating scammer Olga Chernova from Kstovo, Russia:
dating scammer anna ogannisyan from sisian in armenia,ardshininvest bank in sisian in armenia.
|
2009-11-21 09:29:13:
by David
in Dating Scams
on Dating scammer Nancy Milman from Accra, Ghana:
Thanks Miss Marple from Sweden
|
|