Support > General Discussions

curl Segmentation fault

(1/2) > >>

RONB:
I have run into a problem with the curl module. All the download functions work, but none of the upload functions work. When trying to upload an image I get an error, Segmentation fault. Searching for curl and Segmentation fault shows a lot of trouble. The fix I think is to modify the c source for the curl build.
Using Debian 64, had to make a virtual install of win2kpro to upload my files., Ron 

Support:
Hi Ron,

Have you tried using the cURL console utility to upload a file?

Can you post an example of the SB cURL code you're using to upload a file?

FYI: Check out the curl::option CurlHandle,"INFILE","file_name" as SB gets the file size for you using this option.

I will give the Ubuntu 64 Script BASIC cURL ext. module version a try and see if I can reproduce the issue.

Thanks for the feedback!

John

Support:
Ron,

Can you post a snippet of Script BASIC code that shows the seg. fault occurring? I compiled the libcurl extension module on the latest Debian OS using the same cURL ext. module code that is used in 2.1. (nothing in that module changed - used latest libcurl code) The ext. modules (depending who wrote them) may not handle wrong or missing arguments which may be causing the seg. fault. Being able to reproduce the error will help resolve it. Have you tried uploading a file with the cURL command line utility?

Thanks!

John

Support:
No offense but that has to be the strangest cURL file upload call I have ever seen. No encoding of the POST data???

After a second look ...


--- Code: ---curl::option CurlHandle,"HTTPPOST","name=Desade+Marquis"

--- End code ---

Your a1, a2, a3 should be in the above format. (Base64 Encoded)


--- Code: ---name=@filename

This can be used to specify a file to upload. This is like what the browser sends to the web server when an <input type=file name="name"> is used.

--- End code ---

Interesting. I have never uploaded a file this way before.

HTTPPOST string



Support:
Okay. That gives me something to try.

Any chance this could be a file permission thing?

Navigation

[0] Message Index

[#] Next page

Go to full version