Support > General Discussions

curl::escape(URLnonencoded)

(1/2) > >>

Script_test:
Hello again, I'm trying to use to encode url.

--- Code: ---url = curl::escape(URLnonencoded)
--- End code ---

but from windows get stuck the script. It works correctly from linux ?
Thanks.

Support:
Can you post a minimalistic example to test?

Script_test:

--- Code: ---Import "c:\scriptbasic\include\curl.bas"

url = curl::escape("http://www.scriptbasic.org/forum/index.php/topic,342.0.html")

print url
end

--- End code ---

Support:
Works fine on Linux.


--- Code: Script BASIC ---Import curl.bas url = curl::escape("http://www.scriptbasic.org/forum/index.php/topic,342.0.html") print url,"\n" 

jrs@laptop:~/sb/sb22/test$ scriba curl_esc.sb
http%3A%2F%2Fwww.scriptbasic.org%2Fforum%2Findex.php%2Ftopic%2C342.0.html
jrs@laptop:~/sb/sb22/test$


Under Windows 7 32 bit it crashes scriba with a Windows exception.  ::)

Can you try it with the command line version of cURL and see if you get the same results?

I took a quick peek at the cURL extension module code and it seems the escape/unescape  routines use free() while others use besFREE(). The free() should only be used if Script BASIC isn't using it's MyAlloc thread safe memory manager and using a single threaded model and alloc(). The escape stuff must have been added later by someone else. (All theory at this point.) Why it works in Linux, I don't have a clue.

Script_test:

--- Quote ---Can you try it with the command line version of cURL
--- End quote ---


--- Code: ---EXECUTE("curl -S -L -D .............", time_out,pid_v)
--- End code ---
http://files.allbasic.info/ScriptBasic/commands.html#command_EXECUTE


It is the best way!.It works for me. Thank you very much again! ;D

Navigation

[0] Message Index

[#] Next page

Go to full version