in reply to Re: Am I HTTP posting a file correctly?
in thread Am I HTTP posting a file correctly?

Hello,

Thanks sundialsvc4 for your reply. Unfortunately, I can't get inside the server at hand. I was however able to take your advice about the packet sniffer.

Note: I can do the method post using java and it works fine, but in not working in perl.
Using the packet sniffer:
1) the perl script only posts a few hundred bytes seen in the Content-Length: header vs the Java app which posts about 5K.
2) I don't see any multipart boundaries posted from perl, yet they are present when posted from java.
Do I need to "open" the file first and store it locally in memory?

Please help.

Regards,
Mike
  • Comment on Re^2: Am I HTTP posting a file correctly?

Replies are listed 'Best First'.
Re^3: Am I HTTP posting a file correctly?
by Corion (Patriarch) on Nov 26, 2010 at 19:20 UTC

    So, likely, no, you are not sending the same data as your Java program.

    The LWP::UserAgent (resp. HTTP::Request) modules (and objects) have methods to print themselves as strings. Use these to find out whether you are initializing them wrongly or whether you are not sending all data.

    Also consider looking at WWW::Mechanize or at least HTML::Form to make form submission easier, at least if you have a HTML form that you're trying to automate.

Re^3: Am I HTTP posting a file correctly?
by Anonymous Monk on Nov 26, 2010 at 19:42 UTC