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

We've been going back and forth in the Chatterbox for a bit, and I know you're pretty sure that 514 number is accurate, but I still think it isn't. I modified your code to append everything after your HTTP headers to $data, and added these two lines:
print "\$len=$len\n"; print "data length=" . length($data) . "\n";
Now in theory, these should be the same, but they aren't:
(fastolfe) eddie:~$ perl test user password test.file $len=555 data length=580
Try adding 25 to your number and see if your problem goes away.. *shrug*.
  • Comment on RE: RE: Re: amelinda's HTTP/MIME/file upload/not-a-cgi-but-a-client/minimal-module/perl problem
  • Select or Download Code

Replies are listed 'Best First'.
RE: RE: RE: Re: amelinda's HTTP/MIME/file upload/not-a-cgi-but-a-client/minimal-module/perl problem
by amelinda (Friar) on Oct 02, 2000 at 22:44 UTC
    I changed the code so that it puts the entire output into a string, does a $len = (length $output), and then prints $len and $output. If that isn't the right number, I'll eat my hat*.

    amelinda

    * I am prefectly safe in this, as I own no hats. No, wait, I own a pith helmet, and I'm not going to eat that... uhm, if that isn't the right number, I'll eat.... soybeans, yeah that's it.**

    ** Mmmmm, edomame.

      Could this be a buffering issue?
      select(OUT); $|=1; select(STDOUT);
      And from this post can I infer that your data is still getting truncated by the time the server/CGI sees it?