The problem is solved and I still don't fully understand HTTP::Request::Common. I had written
$res = $ua->request(POST "https://panel.dreamhost.com/index.cgi", @fields);
and that was what I have been asking you folks about -- the fields were correct but it wouldn't log in. I looked more carefully at my request and theirs and mine had a content-length of zero and theirs a content-length of 76. Then I noticed that in addition to the form fields it had a "content" of all of the form fields pushed together and HTML encoded. Poring over H::R::C I noticed there is a subtle difference between passing the array of fields and passing a ref to the array of fields. So I made one, very nonintuitive to me!, change in the request:
$res = $ua->request(POST "https://panel.dreamhost.com/index.cgi", \@fields);
and it all magically works now! I had been exploring doing the direct POST construction because for other forms I needed to include a file-upload in the Contents. Now I guess I'll use it for everything in preference to $ua->post(). Whew! Thanks for all the patience and advice.
In reply to Re: Bug in LWP? Missing cookie
by BernieC
in thread Bug in LWP? Missing cookie
by BernieC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |