[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

Increase size of permitted URI

We are entering a comment into a text box on a web page and are receiving an error message that the text is too long.

Request-URI Too Large

The requested URL's length exceeds the capacity limit for this server.
Apache/2.2.3 (CentOS) Server at www.mytesting.com Port 443

Can anyone tell me what I can do to permit the URI to accept a longer string (somewhere about 3000 characters).  We are using Tomcat 7.0.59
0
Nemetona
Asked:
Nemetona
3 Solutions
 
contactkarthiCommented:
You can edit tomcat/conf/server.xml's HTTP/1.1 Connector entry, and add a maxHttpHeaderSize="65536" to increase from the default maximum of 8K or so, to 64K. I imagine that you could up this number as high as necessary, but 64K suffices for my needs at the moment so I haven't tried it.

<Connector port="8080" maxHttpHeaderSize="65536" protocol="HTTP/1.1" ... />

Got it from here
1
 
Dave BaldwinFixer of ProblemsCommented:
It sounds like your form is using GET to submit the data.  GET requests can be limited to as little as 2083 bytes in some browsers.  POST request are essentially unlimited in size.  Note that this is a browser limitation.  Changing the acceptable size on the server will not change it.  Only changing your form and the page on the server to use POST will change it.
1
 
Dr. KlahnPrincipal Software EngineerCommented:
You may want to look at the following Apache configuration control directives:

In httpd.conf:  LimitRequestBody:      Sets maximum length of an entire request
In httpd.conf:  LimitRequestFieldSize: Sets maximum length of a field
In httpd.conf:  LimitRequestLine:      Sets maximum length of request line within body

Open in new window

1
 
NemetonaAuthor Commented:
We tried all three proposed solutions and between them we achieved the result we wanted.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now