One difference between LWP and curl is the User-Agent header in the request. Some servers and server-side applications look at that header (stupid idea, as the client can fake any user agent) and try to block some user agents (more stupid), either using a blacklist of "evil" ones or a whitelist of "good" ones (even more stupid).

I don't think your code behaves like this, but perhaps a library you use on the server side has this nonsense behaviour. Try sending the request from LWP with curl's User-Agent header. If that works, look at your code, the library documentations for the server side, and finally the web server configuration and documentation.

As a side note, I don't generally trust debuggers and rich IDEs. Try adding $response->dump() to your client code. Note that this method behaves like print $response->dump() when called in void context. So, if you want the dump on STDERR or in a log file, call it in a non-void context and write out the dump manually.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^3: LWP and server-side exception propogation by afoken
in thread LWP and server-side exception propogation by amazotron

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.