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". ;-)
|