Greetings,
Having a problem parsing a returned form now that SSL has been enabled at
the target=2E
My application would connect to eBay specifying the page to "change an
auction item description"=2E
I would then catch the returned login page, fill in the userid/password an=
d
would then be directed
to the page to start change item description process (Enter Item Number
page form)=2E
Since eBay has enabled SSL for signing in (couple days ago) my app breaks
when trying to parse for the
input area on the Add Description form using HTML::Form=2E
I changed the first form parse to specify an https url base and do receive=
the login page fine and am able to parse/update/submit
the userid/password using HTML::Form=2E The Add Description page comes bac=
k
ok but the last HTML::Form parse below fails
when I issue that against the returned html=2E I dumped some headers on th=
is
received page that indicate SSL is in effect but
if I save the page and bring it up in a browser the properties of the page=
indicate it's straight http=2E
Not sure how to further debug the HTML::Form that's failing below=2E
Here's the SSL header info -
head1 - AES256-SHA
head2 - /C=3DUS/ST=3DCalifornia/L=3DSan Jose/O=3DeBay Inc=2E/OU=3DSite
Operations/CN=3Dsignin=2Eebay=2Ecom
head3 - /C=3DUS/O=3DRSA Data Security, Inc=2E/OU=3DSecure Server Certifica=
tion
Authority
status is 200 OK
I learned that I needed to have the correct Perl mods for LWP to handle SS=
L
installed on my server and made sure
they were there=2E Crypt::SSLeay and Net::SSLeay were already present and =
I
had IO::Socket::SSL
added=2E This is all running on RHEL 3=2E
Any assistance/guidance/pointers are most appreciated=2E
Thanks,
Steve
Snipit that talks to eBay for Add to Item Description -
#----------------------------------------------------------- --------------=
--
---------------------
# Try to "Add to Item Description" to get the login page (this will return=
the Login page first)
#----------------------------------------------------------- --------------=
--
---------------------
my $ua =3D LWP::UserAgent->new;
$ua->cookie_jar(HTTP::Cookies->new(file =3D> "$CustCookieFile", autosave =3D=
>
1));
$sign_in_page=3D'http://cgi5=2Eebay=2Ecom/ws/eBayISAPI=2Edll ?AddToItemDesc=
ription&fr
omryilanding=3D2';
my $r =3D $ua->request(HTTP::Request->new(GET =3D> "$sign_in_page"));
$html =3D $r->content;
[at] forms =3D HTML::Form->parse($html,'https://signin=2Eebay=2Ecom');
$name=3D 'userid';
$form_password =3D 'pass';
#print "This should be the login page - <BR> $html <BR>";
#---------------------------------------------------------
# Fill in the Userid and Password fields on the login Page
#---------------------------------------------------------
$input_userid =3D $forms[1]->find_input($name);
$input_pass =3D $forms[1]->find_input($form_password);
$input_userid -> value($userid);
$input_pass -> value($ebaypassword);
#------------------------------------------------
# Click the login Submit button on the Login Page
#------------------------------------------------
for my $find_sub ($forms[1]->inputs) {
next unless $find_sub ->type eq 'submit';
$keep_find_sub =3D $find_sub;
}
my $req2 =3D $keep_find_sub->click($forms[1]);
my $uri2 =3D new $HTTP::URI_CLASS($req2->uri);
$req2->uri($uri2);
my $r2 =3D $ua->simple_request($req2);
while ($r2->is_redirect) {
my $u2 =3D $r2->header('location') or die "missing location: ",
$r2->as_string;
# print "redirecting to $u2\n";
$r2 =3D $ua->simple_request(GET $u2);
}
#$headers1 =3D $r2->header('Client-SSL-Cipher');
#$headers2 =3D $r2->header('Client-SSL-Cert-Subject');
#$headers3 =3D $r2->header('Client-SSL-Cert-Issuer');
#$status =3D $r2->status_line;
#print "head1 $headers1 <br> head2 $headers2 <br> head3 $headers3 <br> ";
#print "status is $status";
#my $retry_html =3D $r2->content;
#print "$retry_html";
my $itemnum_page_html =3D $r2->content;
print "This should be the enter Iten Num page $itemnum_page_html ";
print 'this is directly after printing the page';
#----------------------------------------------------------- --------------=
--
---------------------
# We should now be on the "Enter an Item number page"
#----------------------------------------------------------- --------------=
--
---------------------
$itemnum_name =3D 'ItemNo';
$Got_To_Itemnum_Page =3D 'Add To Description';
$itemnum_page_html =3D~ s/\n/ /g; # Get rid of the linefeeds
$itemnum_page_html =3D~ s/\s+/ /g; # Compress spaces/tabs
#----------------------------------------------------------- --------------=
--
---------------------
# Find the Item Num input area and the submit button
#----------------------------------------------------------- --------------=
--
---------------------
print 'before parsing the form <br>';
[at] itemnum_forms =3D
HTML::Form->parse($itemnum_page_html,'http://cgi5=2Eebay=2Ec om/ws/') ;
print 'after parsing the form <br>'; # Never get here
------------------------------------------------------------ --------
mail2web - Check your email from the web at
http://mail2web=2Ecom/ =2E
