Ignoring the "!pu`" and ignoring the missing blank lines in both outputs, the differences are:

script: Connection: keep-alive
brower: [nothing]
This shouldn't matter.

script: Content-Length: 336
browser: Content-Length: 384
You're not sending the same data. That could definitely cause this problem.

script: Cookie: JSESSIONID=1545454aae552555a48773717374620
browser: Cookie: JSESSIONID=9989887adf879da987982jkd11
Differences are to be expected here, but there's no way to tell if the session is still valid. If the session is no longer valid, it could explain your problem. The difference in length of the session ids is odd, but not necessarily meaningful.

script: Cookie2: $Version="1"
brower: [nothing]
This shouldn't matter.

script: [nothing]
browser: Referer: http://somejunk.js.jps.com:8888/ditor/ditctl.do?stuff=stuff
This is could be important. Add this header to the script's request.

There are differences in the order of the headers, but that shouldn't matter.

You might have an easier time using WWW::Mechanize. It should handle just about everything for you. There are two downsides: 1) You have to install it, and 2) it won't help if the page requires JavaScript to submit.


In reply to Re: Submit from browser works but LWP does not by ikegami
in thread Submit from browser works but LWP does not by Plankton

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.