Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 3127
Status: resolved
Priority: 0/
Queue: WWW-Mechanize

People
Owner: MARKSTOS [...] cpan.org
Requestors: kender [...] xs4all.nl
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.48
Fixed in: (no value)



Subject: Unexpected field value
distibution: WWW-Mechanize [0.48] perl: v5.8.0 built for MSWin32-x86-multi-thread OS: windows XP prof SP1 I kept getting this error: Uncaught exception from user code: Unexpected field value http://www.jabberwacky.com/jtreply at (eval 6) line 1 HTTP::Headers::_header('HTTP::Headers=HASH 0x1e3b5c4)','Referer','URI::http=SCALAR(0x1a4a2c8)') called at d:/perl/site/lib/HTTP/Headers.pm line 150 HTTP::Headers::header('HTTP::Headers=HASH(0x1e3b5c4)') called at (eval 6) line 1 HTTP::Message::__ANON__('HTTP::Request=HASH(0x1e3b5dc)','Referer','URI::http=SCALAR(0x1a4a2c8)') called at d:/perl/site/lib/WWW/Mechanize.pm line 1027 WWW::Mechanize::request('WWW::Mechanize=HASH(0x186d0ec)','HTTP::Request=HASH(0x1e3b5dc)') called at d:/perl/site/lib/WWW/Mechanize.pm line 533 WWW::Mechanize::submit('WWW::Mechanize=HASH(0x186d0ec)') called at chat.pl line 11 I fixed it by changing line 1027 in Mechanize.pm from: $request->header( Referer => $self->{last_uri} ) if $self->{last_uri); to: $request->header( Referer => "$self->{last_uri}" ) if $self->{last_uri); it still seems to use the correct referer (checked with ethereal) I don't know if this is a bug in WWW::Mechanize or in HTTP::Message:: but I've seen quite a few posts about getting a "Unexpected field value" while using Mechanized.. Kind regards, Kender
[guest - Sat Aug 2 17:22:14 2003]: Show quoted text
> distibution: WWW-Mechanize [0.48] > perl: v5.8.0 built for MSWin32-x86-multi-thread > OS: windows XP prof SP1 > > I kept getting this error: > > Uncaught exception from user code: > Unexpected field value http://www.jabberwacky.com/jtreply at (eval 6) > line 1 > HTTP::Headers::_header('HTTP::Headers=HASH > 0x1e3b5c4)','Referer','URI::http=SCALAR(0x1a4a2c8)') called at > d:/perl/site/lib/HTTP/Headers.pm line 150 > HTTP::Headers::header('HTTP::Headers=HASH(0x1e3b5c4)') called at (eval > 6) line 1 >
HTTP::Message::__ANON__('HTTP::Request=HASH(0x1e3b5dc)','Referer','URI::http=SCALAR(0x1a4a2c8)') Show quoted text
> called at d:/perl/site/lib/WWW/Mechanize.pm line 1027 >
WWW::Mechanize::request('WWW::Mechanize=HASH(0x186d0ec)','HTTP::Request=HASH(0x1e3b5dc)') Show quoted text
> called at d:/perl/site/lib/WWW/Mechanize.pm line 533 > WWW::Mechanize::submit('WWW::Mechanize=HASH(0x186d0ec)') called at > chat.pl line 11 > > I fixed it by changing line 1027 in Mechanize.pm from: > $request->header( Referer => $self->{last_uri} ) if $self->{last_uri); > to: > $request->header( Referer => "$self->{last_uri}" ) if $self-
> >{last_uri);
> > it still seems to use the correct referer (checked with ethereal) > > I don't know if this is a bug in WWW::Mechanize or in HTTP::Message:: > but I've seen quite a few posts about getting a "Unexpected field > value" while using Mechanized..
I'm resolving this because the Mech code for handling this no longer work this way. Instead, it looks like this: # around like 1440 $last = $last->as_string if ref($last); $req->header( Referer => $last ); Re-open the bug if you still have problems with a current (1.04+) version of Mech.