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

Test fails for libwww-5.61

From:
Mike808
Date:
November 22, 2001 01:40
Subject:
Test fails for libwww-5.61
Message ID:
3BFC55B7.6310AEFE@users.sourceforge.net
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: ftp.activestate.com:80
38      User-Agent: Mozilla/5.0
39
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
Host: ftp.activestate.com:80
User-Agent: Mozilla/5.0
Via: 1.1 ics_server.uschv.am.pnu.com (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 
things.

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

Also,
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_server.uschv.am.pnu.com (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 CPAN.pm as a module that should be
upgraded. Not sure what you should do on that one. Ask Andreas?

Michael/
-- 
perl -le "$_='7284254074:0930970:H4012816';tr[0->][ BOPEN!SMUT];print"



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About