size of the value linked to param?

Hi,
I use HTML and PERL.
The TEXTAREA value linked to param doesn't accept more than 2k.

method is GET, I tried PUT. doesn't work.

Any solution?

Thanks

Pierre
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

0
plerenard
5/28/2001 7:11:08 PM
perl.beginners.cgi 3839 articles. 0 followers. Follow

2 Replies
618 Views

Similar Articles

[PageSpeed] 3
Get it on Google Play
Get it on Apple App Store

<on 28.05.01, P lerenard wrote>
> Hi,
> I use HTML and PERL.
> The TEXTAREA value linked to param doesn't accept more than 2k.
> 
> method is GET, I tried PUT. doesn't work.

Hiya,

Do you mean POST?
It would be useful to know which webserver you are using, and what error is generated.

If you have tried post - then I suggest looking at your webserver configuration.
I know apache can limit the size of the request with the LimitRequestBody directive
http://httpd.apache.org/docs/mod/core.html#limitrequestbody

AFAIK, CGI.pm (are you using this?) will not impose a limit on post unless explicitly requested.

HTH.

--lucy
 
0
lucy
5/28/2001 7:29:23 PM
P lerenard wrote:
> 
> Hi,
> I use HTML and PERL.
> The TEXTAREA value linked to param doesn't accept more than 2k.
> 
> method is GET, I tried PUT. doesn't work.
> 

It should work.  I've got code in production that accepts more.  I've
added to the end of this reply some code you can use to test this.  When
the script is first called it presents a textarea filled with 280000
chracter 'a'.  Click submit and the resulting page gives you the length
of the field.  This works on my system with IE 5.5 and Netscape 4.76
(Apache server).  In testing here, I went up to 1000000 before calling
it quits.

I've included some other information that you might find useful.

Hope this helps.

Dan

---------------------- Vendor Information on URL limits
--------------------------

Note that with method=get, IE has a limit:

  
http://support.microsoft.com/support/kb/articles/Q208/4/27.ASP?LN=EN-US&SD=gn&FR=0&qry=url%20limit&rnk=2&src=DHCS_MSPSS_gn_SRCH&SPR=IEP

   Internet Explorer has a maximum uniform resource locator (URL) length
of 2,083 characters, with a maximum path
   length of 2,048 characters. This limit applies to both POST and GET
request URLs. 

   If you are using the GET method, you are limited to a maximum of
2,048 characters (minus the number of characters
   in the actual path, of course).

   POST, however, is not limited by the size of the URL for submitting
name/value pairs, because they are transferred in
   the header and not the URL. 

   RFC 2616, Hypertext Transfer Protocol -- HTTP/1.1, does not specify
any requirement for URL length. 


For the Netscape I found
http://help.netscape.com/kb/consumer/19971015-8.html

   Created: 10/15/1997      Version: all
   Last Updated: 08/10/1998  OS: All

   Question: 
   Is there a limit on the length of the URL string? 

   Answer: 
   Netscape Communicator and Navigator do not have any limit. Windows
3.1 has a
   restriction of 32kb (characters). (Note that this is operating system
limitation.) See this
   article for information about Netscape Enterprise Server. 

---------------------- Personal Experience testing URL limits
--------------------------

In Netscape 4.76, a query string of 8158 characters worked.  A query
string of 8159 did not.  I got a message from the server so stating

	Request-URI Too Large

So I cannot test fully the limit of Netscape's URL length without
changing the params of the server.

In IE 5.5, a query string of 2048 characters worked.  One of 2049
characters did not.  By "did not" I mean that clicking on the link in
the browser did nothing.  It's as if the extra characters disabled the
browser's ability to handle links.

These test support the information I found above (well, there's no
support for the Netscape information below since the server error
stopped further tests)

---------------------- CGI that can be used to test size limits of
textarea --------------------------

#!/usr/local/bin/perl -w

use strict;
use CGI qw( :standard );

my $task = '';
$task = CGI::param( 'task' ) if( defined CGI::param( 'task' ) );

if( $task eq 'add' ) {
   printResults();
}
else {
   printPage();
}

sub printResults {
   my $input = '';
   $input = CGI::param( 'input' ) if( defined CGI::param( 'input' ) );
   my $length = length( $input );

   print CGI::header .
         "<pre>\n" .
         "Length: [$length]\n" .
         "</pre>\n";
}


sub printPage {
   my $input = 'a' x 280000;

   print CGI::header, <<EOT;
<html>
<head>
</head>
<body>
<form method=post>
<textarea name=input cols=20 rows=20>$input</textarea>
<input type=hidden name=task value=add>
<input type=submit>
</form>
</body>
</html>
EOT
}
0
datm
5/29/2001 2:17:45 PM
Reply: