You should use $r->headers_in->{'User-Agent'} for Apache2.
Yujie Jiang
Maxthon Web Team Leader
Tel:86-010-51651772-849
[EMAIL PROTECTED]
2008-11-03
发件人: Apu islam
发送时间: 2008-11-03 15:49:06
收件人: Mason-Users
抄送:
主题: [Mason] Documentation error
On main Developer's manual, under Examples and Recommended usage:
% my $ua = $r- >header_in('User-Agent');
% if ($ua =~ /msie/i) {
Welcome, Internet Explorer users
...
% } elsif ($ua =~ /mozilla/i) {
Welcome, Netscape users
...
% }
Apache2::RequestRec does not have a header_in() method. It's headers_in() --
> (notice the s on headers). Also it appears to be returning an APR::Table
object. so 'User-Agent' passed in that way shouldn't yield anything.
Not sure if the case is different for mod_perl/Apache 1.x branch. I though this
clarification could be useful on the current documentation for people
developing on 2.x Apache branch.
Thanks.
------------------------------
Apu Islam
( E Pluribus Unum)
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users