You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Idel Fuschini <id...@gmail.com> on 2009/05/11 13:15:14 UTC
USER_AGENT
Hi,
I want to read the user_agent i'm using this code:
my $f = shift;
my $user_agent=$f->headers_in->{'User-Agent'};
but apache logs this error:
Can't locate object method "headers_in" via package "Apache2::Filter"
why ?
--
Idel
=====================
E-Mail: idel.fuschini@gmail.com
Web Site: http://www.idelfuschini.it
OpenSource Project: http://www.idelfuschini.it/apache-mobile-filter.html
Re: USER_AGENT
Posted by Clinton Gormley <cl...@traveljury.com>.
On Mon, 2009-05-11 at 13:15 +0200, Idel Fuschini wrote:
> Hi,
> I want to read the user_agent i'm using this code:
>
> my $f = shift;
> my $user_agent=$f->headers_in->{'User-Agent'};
>
> but apache logs this error:
>
> Can't locate object method "headers_in" via package "Apache2::Filter"
Because it's not a method of Apache2::Filter:
http://perl.apache.org/docs/2.0/api/Apache2/Filter.html
Try $f->r->headers_in->{'User-Agent'}
>
clint