Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

In my (self-declared virtuous) laziness, I'm trying to write a script to POST an XML file to a server. The alternative is to do this by by hand, about 10,000 times - it's part of a migration process.

I've done things like this before; it's not hard. But it's also not working.

I think I'm seeing a problem with LWP handling SSL. If I send the POST to HTTPS, it fails. If I send the post to HTTP is succeeds. (Well, the server doesn't accept HTTP connections, but it connects and the server responds with a 302 redirect to the HTTPS address.)

I've Googled around and others have suggested upgrading OpenSSL. I'm already using the latest OpenSSL 1.01c.

Long delay with Crypt::SSLeay and LWP suggested setting $ENV{HTTPS_VERSION} = 3;, but that didn't work either.

I'd also like to mention in the same script, using WWW::Mechanize, I'm POSTing to an HTTP site and downloading a file and that works fine.

This is the error from LWP:

500 Can't connect to Content-Type: text/plain Client-Date: Wed, 12 Sep 2012 14:38:58 GMT Client-Warning: Internal response Can't connect to LWP::Protocol::https::Socket: SSL connect attempt failed with unknown +errorerror:00000000:lib(0):func(0):reason(0) at C:/web/perl/site/lib/ +LWP/Protocol/ line 51.
I'm running WinXP, ActiveState Perl 5.14.2, OpenSSL 1.01c, and LWP 6.04.

Thoughts? Questions? Comments? Any help will be greatly appreciated.



-- Yup, I'm a Delt.

In reply to LWP Can't POST to HTTPS by dorko

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (7)
    As of 2020-12-03 14:00 GMT
    Find Nodes?
      Voting Booth?
      How often do you use taint mode?

      Results (56 votes). Check out past polls.