Dan Fandrich | 1 Nov 02:07 2007

Re: [patch] src/homedir.c memory smasher

On Wed, Oct 31, 2007 at 04:51:13PM -0700, Toby Peterson wrote:
> Issue only occurs when user has no home directory, i.e. pw->pw_dir is "" 
> (empty string).
>
> In this specific case, homedir() ends up returning pw->pw_dir directly, and 
> it is freed in parseconfig().

Looks good to me.

>>> Dan
--

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved

jan.ausperger | 1 Nov 15:12 2007
Picon

javacurl

Hello,

I have a problem with sftp protocol. I downloaded all 5 dlls for  
Windows from http://sourceforge.net/projects/javacurl and I ran a  
prepared test.java program and all was ok for http protocol but when I  
changed http for sftp, a perform() method returned '1', this is  
ERROR_UNSUPPORTED_PROTOCOL. I thing I have dll(s) without sftp support  
but I don't know what to do with this.

My source code is:

	CurlGlue cg;
       	System.loadLibrary("javacurl");
        	System.loadLibrary("msvcr70");
        	System.loadLibrary("libeay32");
        	System.loadLibrary("oldjavacurl");
        	System.loadLibrary("ssleay32");

	test cw = null;

        	// Register callback write function
        	cg = new CurlGlue();

        	// this will throw a ERROR_NO_CALLBACK_INSTANCE exception, non-fatal
	try {
		cg.setopt(CURL.OPT_WRITEFUNCTION, cw);
	} catch (CURLException e) {
		System.out.println("Wouldn't have thrown an error if we instantiated  
test() first!");
	}
(Continue reading)

Brian Dessent | 1 Nov 15:36 2007
Picon

Re: javacurl

jan.ausperger <at> javlinconsulting.cz wrote:

> prepared test.java program and all was ok for http protocol but when I
> changed http for sftp, a perform() method returned '1', this is
> ERROR_UNSUPPORTED_PROTOCOL. I thing I have dll(s) without sftp support
> but I don't know what to do with this.

The javacurl.dll on that site was linked with libcurl 7.12.1 which is
fairly ancient.  Support for sftp/scp wasn't added until 7.16.1, so
there's no way it's going to work.  You'll have to rebuild the library
with a newer version of libcurl.

Brian

Gisle Vanem | 1 Nov 16:03 2007
Picon

Calling convention

Ops, wrong ML. Resending.
------------

As it is now all applications using libcurl (either dynamically or 
the static lib) must be built with the same calling convention as
libcurl was built with. Normally this would be 'cdecl' (which is
implicit and the only (?) possible calling-convention in gcc).

Sometimes mixing e.g. 'fastcall', 'stdcall' and 'cdecl' would be 
useful. I guess this would be an issue only on Windows and DOS
using non-gcc compilers.

But this would mean we should declare the calling-convention on
all public libcurl functions and function-pointer types. 
E.g. in <curl/curl.h>:

#if !defined(CURL_CCONV)  
#if (defined(__WATCOMC__) || defined(_MSC_VER))
#define CURL_CCONV  __fastcall   /* or __cdecl */
#else
#define CURL_CCONV
#endif
#endif
...
typedef int (*CURL_CCONV curl_sockopt_callback)(void *clientp,
                                                        curl_socket_t curlfd,
                                                        curlsocktype purpose);
...
CURL_EXTERN CURLcode CURL_CCONV curl_global_init(long flags);
...
(Continue reading)

Bruce Peng | 1 Nov 16:13 2007
Picon

How can i stop the data transfer while downloading file from a web server

Hi, All:
When i program with libcurl, i meet a problem. I download file using
libcurl(HTTP), After curl_easy_perform is invoked, 1 byte, 2 bytes, 3,
4, 5,,,,,,,,data receiving.
But sometimes, it stops receiving data before complete. It's waitting
there, curl_easy_perform will not return. i am sure it's because no data
is coming from server.
So, i want to stop the data transfer, making the curl_easy_perform to
return. I try to find an curl option like "response timeout", but failed.
Can somebody tell me how? thanks!

Good luck!

bruce peng
2007-11-01

Jeff Pohlmeyer | 1 Nov 16:43 2007
Picon

Re: How can i stop the data transfer while downloading file from a web server

On Nov 1, 2007 10:13 AM, Bruce Peng <promagian <at> gmail.com> wrote:

> But sometimes, it stops receiving data before complete. It's waitting
> there, curl_easy_perform will not return. i am sure it's because no data
> is coming from server.
> So, i want to stop the data transfer, making the curl_easy_perform to
> return. I try to find an curl option like "response timeout", but failed.

Check the curl_easy_setopt documentation, you probably
want to use on or more of these options:

CURLOPT_TIMEOUT
CURLOPT_CONNECTTIMEOUT
CURLOPT_LOW_SPEED_LIMIT
CURLOPT_LOW_SPEED_TIME

 - Jeff

Picon

how to Post data WITHOUT form?

Hello! I need to post raw data to http://server/page  without any
form/field stuff. Just get data from char *data and send it to server.
After data is sent - I need to get a raw response as char *response.
Any suggestions? ;/

Thanks a lot.

Dan Fandrich | 1 Nov 18:55 2007

Re: how to Post data WITHOUT form?

On Thu, Nov 01, 2007 at 07:30:18PM +0200, Tigersoft Development Group wrote:
> Hello! I need to post raw data to http://server/page  without any
> form/field stuff. Just get data from char *data and send it to server.
> After data is sent - I need to get a raw response as char *response.
> Any suggestions? ;/

If that's true, you don't need curl--you can do it with netcat. But chances
are you don't want to send raw data over a socket, you want to send an HTTP
POST request, or PUT or something similar, with a specific MIME type.
Once you figure out what kind of request you want, then you can figure out
how to do it in libcurl.  The chances are high that you'll need the
CURLOPT_POSTFIELDS option, though.

>>> Dan
--

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved

Dan Fandrich | 1 Nov 19:03 2007

Missing curl-config --features

curl-config --features gives compile-time access to most of the features
listed in curl --version, but not all.  These ones are missing:

CharConv
GSS-Negotiate
Largefile
SPNEGO

Should any of them be added to curl-config as well?  Which would be useful
to know at compile time?

>>> Dan
--

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved

Picon

Re: how to Post data WITHOUT form?

I'm writing a C program which needs to send raw data through HTTP
POST. do you have any example (with netcat too)?

2007/11/1, Dan Fandrich <dan <at> coneharvesters.com>:
> On Thu, Nov 01, 2007 at 07:30:18PM +0200, Tigersoft Development Group wrote:
> > Hello! I need to post raw data to http://server/page  without any
> > form/field stuff. Just get data from char *data and send it to server.
> > After data is sent - I need to get a raw response as char *response.
> > Any suggestions? ;/
>
> If that's true, you don't need curl--you can do it with netcat. But chances
> are you don't want to send raw data over a socket, you want to send an HTTP
> POST request, or PUT or something similar, with a specific MIME type.
> Once you figure out what kind of request you want, then you can figure out
> how to do it in libcurl.  The chances are high that you'll need the
> CURLOPT_POSTFIELDS option, though.
>
> >>> Dan
> --
> http://www.MoveAnnouncer.com              The web change of address service
>           Let webmasters know that your web site has moved
>


Gmane