I can't get a POST to work and I can't figure out why not. I can get and post well enough to get authenticated and otherwise navigate around the site, but this post just won't work. I've tried comparing my _request with the request I see in a WebDeveloper capture of submitting the same POST and as far as I can tell they are identical. I submit all of the same fields that Firefox does {collected from the WD capture - I did't trust that if I just looked at the "view page source" I wouldn't miss one}. The site doesn't give me a hint as to what's wrong, of course, I just get to the appropriate reponse page but with my 'submit' having not happened. Any ideas/tricks for how to figure out what's wrong? It's https:// so I can't go beyond WD to do sniffing of the of actual network data. There aren't any redirects or other oddities: WD says when I click "submit" firefox does a single POST that, as I mentioned, looks pretty much identical to my UserAgeng POST. I have the security tokens correct {it uses two: a security_token POST paramter and a csrf cookie}. I don't know where else to look or what else to try. <p<Just to make it more concrete, the code involved is dead simple:
@fields = (current_step => "New" , next_step => "NewFinal" , [etc ... all the identical fields from both scraping the HTML and lo +oking at WD] ); ); unshift @fields, csrf_token => $csrf_token if $csrf_token ; unshift @fields, security_key => $security_key if $security_key ; $res = $ua->request(POST $_[0], \ @fields) ;
What should I try next?

In reply to Debugging a POST that won't 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.