in reply to On Detecting Broken Links

I say subclass LWP::UserAgent and implement something like I have below. The below linked method is perfectly fine for just checking status. If you wanted to do more than just check status, i'd definetly go with subclassing, but for just checking status, the below linked code is fine.

LWP head replacement

Inspired by LWP head mystery, where a server replies incorrectly to a HEAD request, which is apparently a common bug, this snippet makes a GET request, but closes the socket after reading only 1 character of the content, thus doing basically the same thing HEAD does, while not having to deal with the common problem of a broken HEAD reply.

 
______crazyinsomniac_____________________________
Of all the things I've lost, I miss my mind the most.
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

  • Comment on (crazyinsomniac) Re: On Detecting Broken Links