develooper Front page | perl.libwww | Postings from November 2001

Test fails for libwww-5.61

November 22, 2001 01:40
Test fails for libwww-5.61
Message ID:
In t/live/activestate.t, line 34, I am failing this test.
34==>       $err++ unless $buf eq "TRACE /libwww-perl HTTP/1.1
35      Accept: */*
36      Accept-Language: no,en
37      Host:
38      User-Agent: Mozilla/5.0
40      ";

My response from the TRACE request at line 14 is:
  DB<5> x $buf
0  'TRACE /libwww-perl HTTP/1.0
Accept: */*
Accept-Language: no,en
Connection: keep-alive
User-Agent: Mozilla/5.0
Via: 1.1 (ICS 2.1.118)


It would appear I have an additional header (Via) in my response
(a cacheing server?).

I suggest grep'ing out Via headers (I don't know if there
might be more than one) from the $buf response before matching
the exact strings.

I can't say if the proxy is on my side or on the ActiveState side of 

In any case, it fails the 'make test'.

in t/live/jigsaw-chunk.t, at line 14.
14==>   print "not " unless $res->header("Client-Transfer-Encoding") 
eq "chunked";
  DB<4> x $res->headers
0  HTTP::Headers=HASH(0x480c38)
   'age' => 2060
   'client-date' => 'Tue, 20 Nov 2001 22:11:41 GMT'
   'client-request-num' => 1
   'client-warning' => 'LWP HTTP/1.1 support is experimental'
   'content-length' => 72201
   'content-type' => 'text/plain'
   'date' => 'Tue, 20 Nov 2001 21:37:42 GMT'
   'etag' => 'W/"18LKASD*m:sph2dh6g"'
   'last-modified' => 'Fri, 01 Jun 2001 09:12:53 GMT'
   'server' => 'Jigsaw/2.2.0'
   'via' => '1.1 (ICS 2.1.118)'

I don't get this header back, so perl is doing 'undef eq "chunked"'
and complaining about a "Use of uninitialized value".

Perhaps obtaining the header separately and only performing the
test if you have the header? Or should the test fail if there is no 
such header?

Also, I noticed that one of the modules went from version 1.99 to 1.100
recently, and this was flagged by as a module that should be
upgraded. Not sure what you should do on that one. Ask Andreas?

perl -le "$_='7284254074:0930970:H4012816';tr[0->][ BOPEN!SMUT];print" Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About