1. http_get limits?
- Posted by bugmagnet Jan 22, 2013
- 1014 views
Is there a limit to the length of an http_get command line? I've got one that's 1238 bytes long and doesn't seem to work (I get a -5 error).
However, if I shorten it to say 84 bytes (with a query string), it works perfectly.
What's happening? Am I being a bugmagnet again?
Kind regards,
Bruce/bugmagnet
2. Re: http_get limits?
- Posted by m_sabal Jan 23, 2013
- 948 views
The HTTP protocol limits the length of a URL to 1024 characters total. If you need to pass data to a website in excess of that, you will need to use POST.
3. Re: http_get limits?
- Posted by bugmagnet Jan 23, 2013
- 901 views
The HTTP protocol limits the length of a URL to 1024 characters total. If you need to pass data to a website in excess of that, you will need to use POST.
Interesting. The IIS6 server on my laptop here limits me to 2048 characters. Seems to be server specific.
Am running the following to see what response I get
-- BOEB - Bruce's Own Euphoria Bugs include std/net/http.e with trace trace(2) --sequence url = "http://localhost:8088/a.prx?a=" sequence origurl = "http://openeuphoria.org/forum/index.wc?a=" sequence s = "1" sequence url = origurl for i = 1 to 2048 label "main" do url = url & s object res = http_get(url) printf(1, "%d ", {i} ) if atom(res) then printf( 1, "\nfails on length of %d\n", {i+length(url)}) exit "main" else --printf( 1, "'%s' ", {remove(res[2],1,2)} ) end if end for
Bugmagnet
4. Re: http_get limits?
- Posted by bugmagnet Jan 23, 2013
- 925 views
you will need to use POST.
Yeah, I got that too, and will use it.
Thanks!
Bugmagnet