Hi, I'm a law student trying to learn Perl. Hilarious, huh?

Anyway, I'm trying to write a script to automate looking up the status of court cases online at https://www.dccourts.gov/cco/maincase.jsf. But when I run my code, it just times out and I'm not sure why. The error I get is "error: 500 SSL read timeout: at ./minimaltestcase.pl line 34"

I thought maybe I had done my form pairs improperly, but it doesn't seem like that should be the cause of this problem since with other websites it seems like I can use the POST method even with BS values like 'foo' => 'bar'. I still get something back. If I try to POST to cnn.com or paypal.com, with this script, I do get HTML printed to the console.

Anyway, here's a stripped down version of the script. If anybody can point out an error or point me in a different direction, I would much appreciate it. I did try to use LWP::Debug, but it didn't output anything.

#!/usr/bin/perl -w use warnings; use strict; use LWP::UserAgent; my $url = 'https://www.dccourts.gov/cco/maincase.jsf'; #my $url = 'https://www.paypal.com/'; my $browser = LWP::UserAgent->new; my $response = $browser->post($url, [ 'appData%3Asearchform' => 'appData%3Asearchform', 'appData%3Asearchform%3AsearchPanelCollapsedState' => 'false', 'appData%3Asearchform%3Ajspsearchpage%3AlastName' => '', 'appData%3Asearchform%3Ajspsearchpage%3AcompanyName' => '', 'appData%3Asearchform%3Ajspsearchpage%3AfirstName' => '', 'appData%3Asearchform%3Ajspsearchpage%3Aj_id_id14pc4' => '2011', 'appData%3Asearchform%3Ajspsearchpage%3AselectCaseType' => 'CF2', 'appData%3Asearchform%3Ajspsearchpage%3Aj_id_id18pc4' => '003817', 'appData%3Asearchform%3Ajspsearchpage%3AnameAttributesPanelCollapsed +State' => 'true', 'appData%3Asearchform%3Ajspsearchpage%3AsubmitSearch.x' => '25', 'appData%3Asearchform%3Ajspsearchpage%3AsubmitSearch.y' => '26', 'javax.faces.ViewState' => 'j_id1%3Aj_id2', ] ); #my $response = $browser->post($url, # [ 'foo' => 'bar', # ] #); die "$url error: ", $response->status_line unless $response->is_succes +s; print $response->content;

In reply to LWP SSL TImeouts by amsclark

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.