in reply to Problem with CGI::Vars

Your hypotheses is that read did a partial read and needs to be called again to get the rest. You've offered no proof of this at all, so let's verify it.

Does adding the following to your script help?

use CGI 3.55; BEGIN { *CGI::read_from_client = sub { my($self, $buff, $len, $offset) = @_; local $^W=0; # prevent a warning die if $MOD_PERL; while ($len) { my $bytes_read = read(\*STDIN, $$buff, $len, $offset); die "read: $!\n" if !defined($bytes_read); last if !$bytes_read; $len -= $bytes_read; $offset += $bytes_read; } }; }

help?

Replies are listed 'Best First'.
Re^2: Problem with CGI::Vars
by Chipper (Initiate) on Jun 09, 2011 at 06:34 UTC
    Yes, this is the problem which I'm talking about all the time... Now it's working great :) But I overwrite the read_from_client function straight in CGI.pm. Now problem is gone. So did I true, this is a bug?

      Sorry, but I didn't understand you clearly.

      If you're saying 10,000 bytes are returned by CGI without the code in Re: Problem with CGI::Vars and you get 13,100 bytes with that code, then yeah, there's a bug. Others may disagree, but I'd say the bug is in Perl (not CGI). That said, the issue can easily be sidestepped by changing CGI.

      So did I true, this is a bug?

      Did you install version 3.55 of CGI.pm?

        Yes, now I install version 3.55 and I have the same problem (It reads on one function call only 10000 bytes). Version 3.55 is 1 week old, and the problem is not solved. So what I have to do?