The message returned is already very clear Can't connect.. is oblviously client side: so why the choose of an error of the 5** class?

The message is being returned to you by the client in the absence of any status code from the server because it cannot connect. This doesn't mean that it's a problem with the client - the server could be down or unroutable or the DNS could be screwy or whatever. The 4xx set is for operations where the client is at fault: malformed requests, unauthorized or forbidden access, unsatisfiable negotiation requests and so on.

The HTTP spec defines response codes which the server should provide. An absence of a response at all from the server rather renders a response code irrelevant. I'd be happy for the code to be undefined in the client in such a scenario but 500 seems a reasonable compromise in the absence of anything better. Consider 500 to mean "the request did not complete due to reasons beyond our knowledge".


🦛


In reply to Re: LWP::UserAgent Client-Warning 500 against HTTP standards? by hippo
in thread LWP::UserAgent Client-Warning 500 against HTTP standards? by Discipulus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.