Revision 211
- Date:
- 2012/04/18 19:00:34
- Files:
Legend:
- Added
- Removed
- Modified
-
utf8/core/lib/Contenido/Parser.pm
28 28 my ($fh, $content); 29 29 my $timeout = delete $opts{timeout} || 10; 30 30 my $encoding = delete $opts{encoding}; 31 my $user_agent = delete $opts{user_agent}; 31 32 if (not ref $input) { 32 33 no strict "refs"; 33 34 my $scheme = uc(scheme($input)); … … 35 36 $fh = &{"Contenido::File::Scheme::".uc(scheme($input))."::get_fh"}($input); 36 37 } else { 37 38 my $request = new HTTP::Request GET => $input; 39 warn "REQUEST: ".Dumper( $request ) if $DEBUG; 38 40 my $ua = new LWP::UserAgent; 39 41 $ua->timeout($timeout); 42 $ua->agent($user_agent || 'Mozilla/5.0 Firefox/11.0'); 40 43 my $res = $ua->request($request); 41 44 if ($res->is_success) { 42 45 $self->{headers} = $res->headers;