#!/fellow/monks
I noticed while testing that a working form under mod_cgi has issues under mod_perl (Apache::Registry). It seems the POST gets truncated after a certain size.
Here is a small example script to show the issue:
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
use Data::Dumper;
my $cgi = new CGI();
print $cgi->header();
my $field1 = $cgi->param('field1') || '';
my $field2 = $cgi->param('field2') || '';
print qq{
<table>
<form method="post">
<tr><td><input type="text" name="field1" value="$field1"></td></tr
+>
<tr><td><textarea name="field2" cols="100" rows="30" wrap="hard">$
+field2</textarea></td></tr>
<tr><td><input type="submit" name="submit" value="submit"></td></t
+r>
</form>
</table>
};
print $cgi->pre( Dumper(\$cgi,\%ENV) ),"\n";
1;
You can use anything for the first text field (noting that changing the length of data on this field changes the length allotted to the textarea). Also notice $ENV{CONTENT_LENGTH} is approx '2691'. Simply submitting again with the truncated data is approx '1389' for $ENV{CONTENT_LENGTH}. Also, $CGI::POST_MAX is not set, and has been set ridiculously high to see if that takes care of it.
Here is a good sized value for the textarea to demo the issue:
one one one one one one one one one one one one one one one one one on
+e one one one one one one one one one one one one one one one one one
+ one one one one one one one one one one one one one one one one one
+one one one one one one one one one one one one one one one one one o
+ne one one one one one one one one one one one one one one one one on
+e one one one one one one one one one one one one one one one one one
+ one one one one one one one one one one one one one one one one one
+one one one one
two two two two two two two two two two two two two two two two two tw
+o two two two two two two two two two two two two two two two two two
+ two two two two two two two two two two two two two two two two two
+two two two two two two two two two two two two two two two two two t
+wo two two two two two two two two two two two two two two two two tw
+o two two two two two two two two two two two two two two two two two
+ two two two two two two two two two two two two two two two two two
+two two two two
three three three three three three three three three three three thre
+e three three three three three three three three three three three t
+hree three three three three three three three three three three thre
+e three three three three three three three three three three three t
+hree three three three three three three three three three three thre
+e three three three three three three three three three three three t
+hree three three three three three three three three three three thre
+e three three three three
four four four four four four four four four four four four four four
+four four four four four four four four four four four four four four
+ four four four four four four four four four four four four four fou
+r four four four four four four four four four four four four four fo
+ur four four four four four four four four four four four four four f
+our four four four four four four four four four four four four four
+four four four four four four four four four four four four four four
+ four four four
five five five five five five five five five five five five five five
+five five five five five five five five five five five five five five
+ five five five five five five five five five five five five five fiv
+e five five five five five five five five five five five five five fi
+ve five five five five five five five five five five five five five f
+ive five five five five five five five five five five five five five
+five five five five five five five five five five five five five five
+ five five five
I have googled and searched here but haven't come across a workaround or fix.
Any pointers appreciated... thanks in advance.
crouchingpenguin
"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.