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.


In reply to Re^3: Bug in LWP? Missing cookie by BernieC
in thread Bug in LWP? Missing cookie by BernieC

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.