perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Egor Korablev" <ch...@fryazino.net>
Subject [mp2] size of POST (problem)
Date Tue, 04 Nov 2003 14:56:45 GMT
hi

i use these routines to get POST data from form in my mp2 handler
all work fine,  but if i post a lot of text from my form i get error in
browser "Cannot find server. The Page cannot be displayed". There is nothing
in error_log.

How can i solve this problem? =)

Server Version: Apache/2.0.47 (Red Hat Linux) mod_perl/1.99_10 Perl/v5.8.0
mod_ssl/2.0.47 OpenSSL/0.9.7a DAV/2 PHP/4.3.3


sub getpost {
    my $r = shift;
    if ($r->method_number == Apache::M_POST) {
          my $input = inputDecode(content($r));
          return $input;
    }
    return 0;
}

sub content {
     my $r = shift;
      $r->setup_client_block;
     return '' unless $r->should_client_block;
     my $len = $r->headers_in->get('content-length');
     my $buf;
     $r->get_client_block($buf, $len);
     return $buf;
}

sub inputDecode {
 my $data = shift;
 my $input = {};
 foreach my $pair (split(/\&/,$data)) {
  my ($key,$value) = split(/=/,$pair);
  $value=~tr/\+/ /;
  $value =~ s/%(?:([0-9a-fA-F]{2})|u([0-9a-fA-F]{4}))/defined($1)? chr
hex($1) : utf8_chr(hex($2))/ge;
  $value=~s/</&lt;/gso;
  $value=~s/>/&gt;/gso;
  $value=~s/^\s+//gso;
  $value=~s/\s+$//gso;
  $value=~s{\"}{&quot;}gso;
$input->{$key} = $value;
 }
 return $input;
}


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Mime
View raw message