Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Submit from browser works but LWP does not

by ikegami (Patriarch)
on Jul 12, 2005 at 20:12 UTC ( [id://474377]=note: print w/replies, xml ) Need Help??


in reply to Submit from browser works but LWP does not

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://474377]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-19 19:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found