in reply to Re^2: Bug in LWP? Missing cookie
in thread Bug in LWP? Missing cookie
No the other way: just putting in @fields or , as it is in the docs, name=> value, name=>value, ... didn't work. What did work is using the reference: \@fields. They both send the POST variables and values, except: the reference one also includes a 'content' string which is all the variables concatenated and html encoded. That made the difference and *everything* magically worked. I wish I could explain more about what made the difference or why it worked.
How I found it is that I compared every byte that my browser sent with what my Perl program sent. They were {essentially} identical except that I noticed that the browser had a content-length of 76 {and the data string i mentioned above} and Perl had a content-length of 0. I pored over the docs and blundered across a mention of the content-length stuff in HTTP::Request::Common, tried it and discovered that that made Perl sent the content-string and it all worked. If someone understands this bit of the POST formatting, I'd be happy to better understand what was/is going on. But for now, all I can say is that using the reference works and using the array doesn't.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Bug in LWP? Missing cookie
by AnomalousMonk (Archbishop) on Aug 05, 2018 at 18:18 UTC | |
|
Re^4: Bug in LWP? Missing cookie
by bliako (Abbot) on Aug 05, 2018 at 22:32 UTC | |
by ikegami (Patriarch) on Aug 05, 2018 at 23:33 UTC |