in reply to amelinda's HTTP/MIME/file upload/not-a-cgi-but-a-client/minimal-module/perl problem

Thank you everyone who helped me with this, especially jcwren and fastolfe.

In the end, it turned out to be a combination of factors involving UNIX/Windows CRLF issues, MIME encoding issues, an important and missing piece of HTTP syntax, assumptions by the cgi-script recieving the form, and general weirdness.

jcwren's working LWP code massively helped me decipher the issues involved (especially that damned missing Content-Length needed for the FILE parameter), to the point where I could get my non-LWP code working and look at the cgi-bin's output and go "WTF?" and figure out that it was expecting it to be mimencoded and on top of that, mimencoded in a Windows environment! But now the cgi's chop;chop;$_ = "$_\n"; is chomp;chomp;$_ = "$_\n"; instead and all is well with the world.

  • Comment on Re: amelinda's HTTP/MIME/file upload/not-a-cgi-but-a-client/minimal-module/perl problem
  • Select or Download Code