1. http_get limits?

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

new topic     » topic index » view message » categorize

2. Re: http_get limits?

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.

new topic     » goto parent     » topic index » view message » categorize

3. Re: http_get limits?

m_sabal said...

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

new topic     » goto parent     » topic index » view message » categorize

4. Re: http_get limits?

m_sabal said...

you will need to use POST.

Yeah, I got that too, and will use it.

Thanks!

Bugmagnet

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu