W3C home > Mailing lists > Public > public-qa-dev@w3.org > August 2008

latest LWP running under perl -T dies for some values of agent()

From: olivier Thereaux <ot@w3.org>
Date: Tue, 26 Aug 2008 09:48:19 -0400
Message-Id: <8B3AB19C-ECCC-4BAB-ACBB-0510F679D949@w3.org>
To: dev list <public-qa-dev@w3.org>

Hello,

Would any of the better perl hackers on this list be able to look into  
an issue we are running into with LWP?

the link checker has the issue:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487376
http://qa-dev.w3.org/wlc/checklink?uri=http%3A%2F%2Fwww.w3.org%2F

So does the markup validator:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=5988
http://qa-dev.w3.org/wmvs/HEAD/check?uri=http%3A%2F%2Fwww.w3.org%2F;user-agent=1

This seems to only happen with the most recent version of LWP when:
- running as perl -T
- using LWP::UserAgent
- calling $ua->agent(...)
- AND some other factors I have not yet figured out

LWP dies with:
   Software error: Insecure dependency in eval while running with -T  
switch at /usr/local/share/perl/5.10.0/HTTP/Message.pm line 413.

As as quick workaround I was thinking of running the $ua->agent()  
within and eval{} but it is clumsy, and does not quite fix the issue.

I have, however, been so far unable to produce a reduced test case.  
The exact causes of the crash still elude me: for example, the markup  
validator does NOT crash when sending an agent() defined with its  
default string, but does crash whenever passing $q->param('user- 
agent'). Maybe some kind of perl decoding/encoding weirdness, causing  
LWP to consider the string malformed? Hard to tell, really.

If any of you could look into this, it would be very valuable. If not,  
I'll just go with the eval{} and/or deprecate the user-agent override  
functionality.

Thanks,
-- 
olivier
Received on Tuesday, 26 August 2008 13:48:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 19 August 2010 18:12:49 GMT