Page 1 of 1

hurl and formdata Limits

Posted: Sun Jan 05, 2025 5:42 pm
by evil
Hiho!

I need to update an SQL-Table

For this I use UploadFile() with a key/value pair for each row of the table.
Everything works fine unless I use more than 18 name/data values inside the formdata table.
Is there any restriction concerning the amount of name/data entries inside the formdata table of UploadFile() ?

Best regards

George

Re: hurl and formdata Limits

Posted: Mon Jan 06, 2025 10:51 pm
by airsoftsoftwair
There should be no limit here. Can you post the actual code?

Re: hurl and formdata Limits

Posted: Tue Jan 07, 2025 1:58 am
by evil
No, I can't. It's to hugh and full of variables...
I'll try to cut it down, but that may take a while...

Might there be any Limit of arguments inside the html/php conventions??

Re: hurl and formdata Limits

Posted: Tue Jan 07, 2025 2:31 pm
by evil
Ok. A small while later....

Here is an example snippet:

Code: Select all

@REQUIRE "hurl"
p={ {name="t00", data="1"},
	{name="t01", data="1"},
	{name="t02", data="1"},
	{name="t03", data="1"},
	{name="t04", data="1"},
	{name="t05", data="1"},
	{name="t06", data="1"},
	{name="t07", data="1"},
	{name="t08", data="1"},
	{name="t09", data="1"},
	{name="t10", data="1"},
	{name="t11", data="1"},
	{name="t12", data="1"},
	{name="t13", data="1"},
	{name="t14", data="1"},
	{name="t15", data="1"},
	{name="t16", data="1"},
	{name="t17", data="1"},
	{name="func", data="test"}}

server$="http://evil.bplaced.net/test.php"
t$=UploadFile(server$,{FormData=p,Adapter="hurl"})

Debugprint(t$)
This code returns a stack overflow.
Removing any key/value entry of inside p will lead to a correct function and Output "Test bestanden".

Best regards

George

Re: hurl and formdata Limits

Posted: Sun Jan 12, 2025 10:31 pm
by airsoftsoftwair
Ok, now I see it. Looks like UploadFile() doesn't grow the stack so that everything in the table fits. It's a bug I'm afraid. Will be fixed.

Re: hurl and formdata Limits

Posted: Mon Jan 13, 2025 1:21 am
by evil
Ok. Any plans for the release of the next update??

Re: hurl and formdata Limits

Posted: Fri Jan 24, 2025 10:33 pm
by airsoftsoftwair
Sure, when it's ready, but hopefully rather sooner than later ;)

Re: hurl and formdata Limits

Posted: Sun Jan 26, 2025 3:57 pm
by evil
Cool! Thanks!!

Re: hurl and formdata Limits

Posted: Sun May 04, 2025 5:34 pm
by airsoftsoftwair

Code: Select all

- Fix: The "FormData" table tag of the UploadFile() command didn't manage the stack correctly which caused
  a stack overflow when passing a table with many elements

Re: hurl and formdata Limits

Posted: Mon May 05, 2025 4:40 pm
by evil
Thanks again!!

Just in time for my actual project!!


Best regards

Evil