July 2014 Archives

Broken LWP in the wild

I have app which do some stuff via HTTP/HTTPS. Here it is, already posted about it on blogs.perl.org

There is simple logic:

1) Use http. If user wants https, use https but check that LWP version >= 6 AND LWP::UserAgent->is_protocol_supported("https")
2) Retry HTTP 500 server errors. There can be a lot (coming from server, it's normal)
3) Retry HTTP 500 errors with Client-Warning=Internal response (LWP could raise this in case of conenction problem and socket timeā€¦

About vsespb

user-pic I blog about Perl.