This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Servlets and the fly likes Length of a URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Length of a URL" Watch "Length of a URL" New topic
Author

Length of a URL

Suku Kana
Greenhorn

Joined: Mar 14, 2002
Posts: 3
Hi friends,
I am not sure whether this question fits in here. But, I am also not sure where else to post it.
I have a servlet to which I am passing lots of parameters. I found that in IE, if I pass more than 2050 characters as a URL, the request doesn't even reach the servlet. In netscape, I found that the number of characters allowed in a URL is more (not sure how long).
Can anyone tell me whether there is any restriction on the number of characters allowed in a URL? If so, how many in IE/Netscape?
Regards,
Suresh.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

I had the same question once and someone pointed out RFC2616 - HTTP 1.1, section 3.2.1 in particular, which states:
Note: Servers ought to be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations might not properly support these lengths.

Now this RFC is dated June 1999 so I'd hope things were better than this, but there is no guarantee. I tend to try to limit things to 1024 characters, but there are too many things that can go wrong if you leave it unbounded...
Dave.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Length of a URL