maximum length for $_GET
am 29.08.2007 09:28:13 von Hans-Peter Sauer
Hi,
what is the maximum lengths for a $_GET string? I have to upload a
text file, but it's quite awkard to use $_POST if $_GET would work.
thank you in advice.
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
Re: maximum length for $_GET
am 29.08.2007 11:24:28 von rf
"Gernot Frisch" wrote in message
news:5jklf7F149hU1@mid.individual.net...
>
> Hi,
>
> what is the maximum lengths for a $_GET string?
A couple of hundred bytes or so.
> I have to upload a text file, but it's quite awkard to use $_POST if $_GET
> would work.
Why is it awkard to use post?
--
Richard.
Re: maximum length for $_GET
am 29.08.2007 11:35:33 von luiheidsgoeroe
On Wed, 29 Aug 2007 11:24:28 +0200, rf wrote:
>
> "Gernot Frisch" wrote in message
> news:5jklf7F149hU1@mid.individual.net...
>>
>> Hi,
>>
>> what is the maximum lengths for a $_GET string?
>
> A couple of hundred bytes or so.
Virtually limitless. The bottleneck in using very long urls seem to be the
ua's & http servers themselves, especially MSIE.
>> I have to upload a text file, but it's quite awkard to use $_POST if
>> $_GET
>> would work.
>
> Why is it awkard to use post?
>
Because one cannot link to it directly?
--
Rik Wasmus
My new ISP's newsserver sucks. Anyone recommend a good one? Paying for
quality is certainly an option.
Re: maximum length for $_GET
am 29.08.2007 11:43:04 von Hans-Peter Sauer
> Virtually limitless. The bottleneck in using very long urls seem to
> be the
> ua's & http servers themselves, especially MSIE.
>
Oh! Much too short for me.
Now, is there any way of using wget or some command line tool to write
post data? If all fails, I could write a html file with a "submit"
button, but that's no good idea.
The background: I've written a game, where the users should be able to
upload their created levels (ini file, about <2MB) from within the
program. My programming language allows HTTP getting, but not with
post data.
thanks for any ideas.
Re: maximum length for $_GET
am 29.08.2007 11:47:19 von luiheidsgoeroe
On Wed, 29 Aug 2007 11:43:04 +0200, Gernot Frisch wrote:
>> Virtually limitless. The bottleneck in using very long urls seem to
>> be the
>> ua's & http servers themselves, especially MSIE.
>>
>
> Oh! Much too short for me.
> Now, is there any way of using wget or some command line tool to write
> post data?
Writing post data is fairly easy, just write to the body of the request.
Even simply done in telnet and the like.
> If all fails, I could write a html file with a "submit"
> button, but that's no good idea.
>
> The background: I've written a game, where the users should be able to
> upload their created levels (ini file, about <2MB) from within the
> program. My programming language allows HTTP getting, but not with
> post data.
Which is weird...
--
Rik Wasmus
My new ISP's newsserver sucks. Anyone recommend a good one? Paying for
quality is certainly an option.
Re: maximum length for $_GET
am 29.08.2007 12:59:37 von rf
"Rik Wasmus" wrote in message
news:op.txtd9j2p5bnjuv@metallium.lan...
> On Wed, 29 Aug 2007 11:24:28 +0200, rf wrote:
>
>>
>> "Gernot Frisch" wrote in message
>> news:5jklf7F149hU1@mid.individual.net...
>>>
>>> Hi,
>>>
>>> what is the maximum lengths for a $_GET string?
>>
>> A couple of hundred bytes or so.
>
> Virtually limitless.
True. In theory.
> The bottleneck in using very long urls seem to be the ua's & http servers
> themselves, especially MSIE.
So, as I said, the limit is a couple of hundred of bytes or so.
--
Richard.
Re: maximum length for $_GET
am 29.08.2007 13:05:51 von luiheidsgoeroe
On Wed, 29 Aug 2007 12:59:37 +0200, rf wrote:
>
> "Rik Wasmus" wrote in message
> news:op.txtd9j2p5bnjuv@metallium.lan...
>> On Wed, 29 Aug 2007 11:24:28 +0200, rf wrote:
>>
>>>
>>> "Gernot Frisch" wrote in message
>>> news:5jklf7F149hU1@mid.individual.net...
>>>>
>>>> Hi,
>>>>
>>>> what is the maximum lengths for a $_GET string?
>>>
>>> A couple of hundred bytes or so.
>>
>> Virtually limitless.
>
> True. In theory.
>
>> The bottleneck in using very long urls seem to be the ua's & http
>> servers
>> themselves, especially MSIE.
>
> So, as I said, the limit is a couple of hundred of bytes or so.
Call me picky, but '2,048 characters' does not equal 'a couple of hundred
of bytes'.
--
Rik Wasmus
My new ISP's newsserver sucks. Anyone recommend a good one? Paying for
quality is certainly an option.
Re: maximum length for $_GET
am 29.08.2007 13:24:27 von rf
"Rik Wasmus" wrote in message
news:op.txtif1vr5bnjuv@metallium.lan...
> On Wed, 29 Aug 2007 12:59:37 +0200, rf wrote:
>
>>
>> "Rik Wasmus" wrote in message
>> news:op.txtd9j2p5bnjuv@metallium.lan...
>>> On Wed, 29 Aug 2007 11:24:28 +0200, rf wrote:
>>>
>>>>
>>>> "Gernot Frisch" wrote in message
>>>> news:5jklf7F149hU1@mid.individual.net...
>>>>>
>>>>> Hi,
>>>>>
>>>>> what is the maximum lengths for a $_GET string?
>>>>
>>>> A couple of hundred bytes or so.
>>>
>>> Virtually limitless.
>>
>> True. In theory.
>>
>>> The bottleneck in using very long urls seem to be the ua's & http
>>> servers
>>> themselves, especially MSIE.
>>
>> So, as I said, the limit is a couple of hundred of bytes or so.
>
> Call me picky, but '2,048 characters' does not equal 'a couple of hundred
> of bytes'.
2048 bytes exactly? :-)
Please cite a reference to this figure. I have heard figures as low as 256.
It is after all up to the UA whereas post is not.
"a couple of hundred bytes" means exactly what it says. Enough for a few
short gets and if it breaks then it's time to use post. And even 2048 is not
nearly enouth for a "text file" which the OP specified, especially when
later in the thread the OP admits to 2MB.
--
Richard.
Re: maximum length for $_GET
am 29.08.2007 14:01:04 von luiheidsgoeroe
On Wed, 29 Aug 2007 13:24:27 +0200, rf wrote:
> "Rik Wasmus" wrote in message
> news:op.txtif1vr5bnjuv@metallium.lan...
>> On Wed, 29 Aug 2007 12:59:37 +0200, rf wrote:
>>
>>>
>>> "Rik Wasmus" wrote in message
>>> news:op.txtd9j2p5bnjuv@metallium.lan...
>>>> On Wed, 29 Aug 2007 11:24:28 +0200, rf wrote:
>>>>
>>>>>
>>>>> "Gernot Frisch" wrote in message
>>>>> news:5jklf7F149hU1@mid.individual.net...
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> what is the maximum lengths for a $_GET string?
>>>>>
>>>>> A couple of hundred bytes or so.
>>>>
>>>> Virtually limitless.
>>>
>>> True. In theory.
>>>
>>>> The bottleneck in using very long urls seem to be the ua's & http
>>>> servers
>>>> themselves, especially MSIE.
>>>
>>> So, as I said, the limit is a couple of hundred of bytes or so.
>>
>> Call me picky, but '2,048 characters' does not equal 'a couple of
>> hundred
>> of bytes'.
>
> 2048 bytes exactly? :-)
Nope, it depends. 1 character is not neccessarily 1 byte offcourse.
> Please cite a reference to this figure. I have heard figures as low as
> 256.
It's Microsofts own limitation on MSIE, you can find it on their site. MS
seems to be the lowest of the bunch (UA's, servers). Possibly there are
UA's with an even lower limitation, I haven't found them yet.
> It is after all up to the UA whereas post is not.
As far as I gather, there is in this case no real UA involved but rather
just a piece of code that can do HTTP requests. Wether or not his code can
handle larger of smaller URL's depends.
> "a couple of hundred bytes" means exactly what it says. Enough for a few
> short gets and if it breaks then it's time to use post.
Aside from the fact that the URL is only limited by software using it,
indeed, it shouldn't be that large, but it could. If you mean to say
'don't make it that large' (and for very good reason) say that, don't
claim it's 'a couple of hundred bytes': That's simply not true, and may
confuse the OP if he checks up on it
> And even 2048 is not
> nearly enouth for a "text file" which the OP specified, especially when
> later in the thread the OP admits to 2MB.
Indeed, file upload by GET is something to run away from immediately. The
OP really should POST (or PUT, or use another protocol (FTP comes to
mind))..
--
Rik Wasmus
My new ISP's newsserver sucks. Anyone recommend a good one? Paying for
quality is certainly an option.
Re: maximum length for $_GET
am 29.08.2007 16:58:20 von Jerry Stuckle
Rik Wasmus wrote:
> On Wed, 29 Aug 2007 13:24:27 +0200, rf wrote:
>> "Rik Wasmus" wrote in message
>> news:op.txtif1vr5bnjuv@metallium.lan...
>>> On Wed, 29 Aug 2007 12:59:37 +0200, rf wrote:
>>>
>>>>
>>>> "Rik Wasmus" wrote in message
>>>> news:op.txtd9j2p5bnjuv@metallium.lan...
>>>>> On Wed, 29 Aug 2007 11:24:28 +0200, rf wrote:
>>>>>
>>>>>>
>>>>>> "Gernot Frisch" wrote in message
>>>>>> news:5jklf7F149hU1@mid.individual.net...
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> what is the maximum lengths for a $_GET string?
>>>>>>
>>>>>> A couple of hundred bytes or so.
>>>>>
>>>>> Virtually limitless.
>>>>
>>>> True. In theory.
>>>>
>>>>> The bottleneck in using very long urls seem to be the ua's & http
>>>>> servers
>>>>> themselves, especially MSIE.
>>>>
>>>> So, as I said, the limit is a couple of hundred of bytes or so.
>>>
>>> Call me picky, but '2,048 characters' does not equal 'a couple of
>>> hundred
>>> of bytes'.
>>
>> 2048 bytes exactly? :-)
>
> Nope, it depends. 1 character is not neccessarily 1 byte offcourse.
>
>> Please cite a reference to this figure. I have heard figures as low as
>> 256.
>
> It's Microsofts own limitation on MSIE, you can find it on their site.
> MS seems to be the lowest of the bunch (UA's, servers). Possibly there
> are UA's with an even lower limitation, I haven't found them yet.
>
>> It is after all up to the UA whereas post is not.
>
> As far as I gather, there is in this case no real UA involved but rather
> just a piece of code that can do HTTP requests. Wether or not his code
> can handle larger of smaller URL's depends.
>
>> "a couple of hundred bytes" means exactly what it says. Enough for a few
>> short gets and if it breaks then it's time to use post.
>
> Aside from the fact that the URL is only limited by software using it,
> indeed, it shouldn't be that large, but it could. If you mean to say
> 'don't make it that large' (and for very good reason) say that, don't
> claim it's 'a couple of hundred bytes': That's simply not true, and may
> confuse the OP if he checks up on it
>
>> And even 2048 is not
>> nearly enouth for a "text file" which the OP specified, especially when
>> later in the thread the OP admits to 2MB.
>
> Indeed, file upload by GET is something to run away from immediately.
> The OP really should POST (or PUT, or use another protocol (FTP comes to
> mind))..
The bottom line is, it isn't documented in the specs. Each browser has
it's own limitations.
And I agree with rf in this part. Maybe not "a couple of hundred
bytes", but not a huge amount. It's much easier to just post the larger
stuff.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: maximum length for $_GET
am 31.08.2007 19:52:58 von unknown
Post removed (X-No-Archive: yes)
Re: maximum length for $_GET
am 31.08.2007 21:00:40 von Shion
Gernot Frisch wrote:
>> Virtually limitless. The bottleneck in using very long urls seem to
>> be the
>> ua's & http servers themselves, especially MSIE.
>>
>
> Oh! Much too short for me.
> Now, is there any way of using wget or some command line tool to write
> post data?
Read the man page or the info page for wget (if you are using a system that
hasn't any of these excellent documentation systems, then google for the man
page), you can post data, use cookies and a lot of other stuff.
--
//Aho