• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Length of URL in get method

 
Bharatesh H Kakamari
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the maximum length of URL in get method ?
 
Randall Twede
Ranch Hand
Posts: 4482
3
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe there is a limit, but I dont know what it is.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe it is all in all (path + query-string) 256 characters
bsp
[This message has been edited by Peter Singewald (edited March 08, 2001).]
 
kumard
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bharatesh H Kakamari:
What is the maximum length of URL in get method ?


using get method you can pass parameter up to 2k. some place I found there is no limitation.
 
Sander Fieten
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I assume the question is about the maximum length of an URL for getting data using the GET method specified in the HTTP protocol?
In this spec no limit is given for URLs. It's stated that a server must be able to handle URLs for all resources they serve and that can be generated by GET based forms they serve.
See at http://www.ietf.org/rfc/rfc2616.txt for the complete HTTP spec.
greetings
Sander
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"kumard"
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Posts which contravene the naming convention are not eligible to win books! Please choose a new name which meets the requirements.

Thanks.
 
Barry Andrews
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The length of the url for get depends on which application server you are using. For Weblogic 6.0, it is 4k bytes. It also depends on the browser, but IE is really high. I don't rememeber now, but I know that noone would ever run into a problem because the maximum is so high.

Barry
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to previous reading I did, the supported length for URL strings is very hard to specify. Acording to the spec there is no defined limit, but in reality the length must be supported by each step during the transfer of data.Therefore it is dependant on browsers, proxies, web servers, app servers and anywhere else the url has to be sent through.
The behaviour of long strings is not specified either. In most case it will be truncated, but (once again) I've read that strings over 10k can kill the IIS process.
As a rule of thumb, (besides usually using POST) I personally wouldn't go over 2k and would be unhappy over 1k.
 
Suneel Setlur
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its 240 characters.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic