Thank you. I was using $r->headers_in()->get('User-Agent'), but yours work too.
I have a question about the cookie. I am trying to get the cookie information 
from the incoming request. How can I access that? Do I need the 
Apache2::Cookie? Can I just parse the request data structure and parse the 
cookie out ?

Thanks.
 ------------------------------
Apu Islam
( E Pluribus Unum)




________________________________
From: hfahe <[EMAIL PROTECTED]>
To: Apu islam <[EMAIL PROTECTED]>; Mason-Users 
<mason-users@lists.sourceforge.net>
Sent: Monday, November 3, 2008 2:15:22 AM
Subject: Re: [Mason] Documentation error

 
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
Mason-users@lists.sourceforge.net
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
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to