473,756 Members | 5,850 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What are the limits on a GET query string?


What are the theoretical and practical limits on the length
of a GET query string, currently?

Strange to say, I found this rather simple question hard to answer,
possibly because of searching the wrong terms, or, rather, because
the terms ("get", "form", "length" etc.) are so common as to be
useless for searching.

An email correspondent assures me that there's an RFC which limits the
length of a URI, including query string, to 1024 bytes, but he has
"forgotten" which RFC it was. I have to say that the only relevant
reference I found was a statement that in (early) versions of HTML,
the "SGML declaration" limited the value of a URI reference to 1024
because this was the value of LITLEN - but in current versions of
HTML, LITLEN is set to 65k minus 1 - and that's presumably only for
formal reasons.

Worse, this correspondent claimed to have "proved" the claimed limit
in versions of MSIE and other browsers. Well, a quick hack with MSIE
has demonstrated to me that there seems to be some kind of limit on
the length of individual submitted field values (or maybe the limit is
on the name=value combination?), at least, though it's /not/ at 1024.
I stopped there, rather than investigating how many more name=value
combinations I could add before hitting a limit, because I don't
really want to spend a lot of time challenging different browsers with
different length URLs to find where the limit is, if someone has done
it all before.

And, as I say, if there is any theoretical (e.g RFC-specified) limit
on a query string and/or on the whole URL, I'm interested in a cite.

Could anyone please direct me to any known resources on this topic?

(The particular context was the distress caused by idempotent
transactions which, on account of potentially long query strings, have
been designed to use POST instead: browsers get stroppy, and keep
throwing dialogs at the user to protect them from re-submitting this
potentially non-idempotent method. Indeed my correspondent argued
eloquently that there ought to be a third method for forms submission
- one which used method POST, but was defined to be idempotent, and
thus free of re-submission protection mechanisms. However, that's
another topic...)

cheers
Sep 11 '05 #1
1 6359
In article <Pi************ *************** ****@ppepc56.ph .gla.ac.uk>,
"Alan J. Flavell" <fl*****@ph.gla .ac.uk> writes

What are the theoretical and practical limits on the length
of a GET query string, currently?

Strange to say, I found this rather simple question hard to answer,
possibly because of searching the wrong terms, or, rather, because
the terms ("get", "form", "length" etc.) are so common as to be
useless for searching.

And, as I say, if there is any theoretical (e.g RFC-specified) limit
on a query string and/or on the whole URL, I'm interested in a cite.

Could anyone please direct me to any known resources on this topic?


There is the note in rfc2616 on the length of an URI:

The HTTP protocol does not place any a priori limit on the length of
a URI. Servers MUST be able to handle the URI of any resource they
serve, and SHOULD be able to handle URIs of unbounded length if they
provide GET-based forms that could generate such URIs. A server
SHOULD return 414 (Request-URI Too Long) status if a URI is longer
than the server can handle (see section 10.4.15).

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.

--
Philip Baker
Sep 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
1770
by: William S. Perrin | last post by:
I'm a python rookie, anyone have and suggestions to streamline this function? Thanks in advance..... def getdata(myurl): sock = urllib.urlopen(myurl) xmlSrc = sock.read() sock.close() xmldoc = minidom.parseString(xmlSrc)
3
2095
by: Keith | last post by:
I've inherited an Access file in which there is the following query: SELECT tblItem.InstanceNo, "PL" & Left(.,InStr(.,"-")-1) AS Parent FROM tblItem, tblItem AS tblItem_1 WHERE ((("PL" & Left(.,InStr(.,"-")-1))=.)); So the same table is included twice and is used as criteria for . I would have thought that the query would return two identical
86
3942
by: Randy Yates | last post by:
In Harbison and Steele's text (fourth edition, p.111) it is stated, The C language does not specify the range of integers that the integral types will represent, except ot say that type int may not be smaller than short and long may not be smaller than int. They go on to say, Many implementations represent characters in 8 bits, type short in
17
8041
by: | last post by:
I have an app that retrieves data from an Access database. At the moment I have the SQL string as a Const in my app. I understand this is not best practice. I don't want the user to have access to read or modify this string so I don't want to store it in an INI / Text file or in registery. Can someone please tell me the best practice for this. Thanks Mike
9
10390
by: Kevin Westhead | last post by:
Can anyone confirm whether or not there are any limits imposed on the widths of autosized columns in a list-view. I've found that the autosizing appears to have an upper limit, i.e. it will not expand beyond some (unknown) maximum length. This applies to user-autosizing (double-clicking the divider) and code-autosizing using LVSCW_AUTOSIZE. For example, create a new project and place a ListView (VB5 version) and CommandButton on a form...
89
5753
by: Tubular Technician | last post by:
Hello, World! Reading this group for some time I came to the conclusion that people here are split into several fractions regarding size_t, including, but not limited to, * size_t is the right thing to use for every var that holds the number of or size in bytes of things. * size_t should only be used when dealing with library functions.
5
1440
by: tduncan | last post by:
I've been trying to build a database with Access, and have been building query on top of query to get around Access' limits on the number of fields in a table or query. I've divided up some of my tables, but still need a total on my reports. I keep running into the wall with "Too many fields defined" or "Query is too complex." Is there a way around the seemingly artificial limits Access puts on you? Or is there another database I should...
7
7754
by: copx | last post by:
Do the standards say anything about size limits for string literals (min size, max size)? I want to know this to make sure that my code is portable. The program in question is ANSI C89, but I would also be interested in whether or not ISO C99 changed the limits (if any exist).
13
1668
by: Josip | last post by:
I'm trying to limit a value stored by object (either int or float): class Limited(object): def __init__(self, value, min, max): self.min, self.max = min, max self.n = value def set_n(self,value): if value < self.min: # boundary check self.n = self.min if value self.max:
0
9454
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9271
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10028
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9707
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7242
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6533
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5139
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2664
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.