Daniel Stenberg | 1 Dec 12:03 2002
Picon

Re: transfer-encoding chunked please

On Fri, 29 Nov 2002 RBramante <at> on.com wrote:

> How about adding a constant for setting the CURLOPT_INFILESIZE that would
> imply a dynamic length and request that libcurl perform the transfer in
> chunked fashion?
>
> e.g. CURLOPT_INFILE_DYNAMIC = -1
>
> This would at least allow the user to have a more precise way of requesting
> chunked encoding above setting a custom header without needing to add
> another CURLOPT. Since you are"setting" the infilesize (even though it may
> be unknown) this would seem to make sense to me and is what I did when I
> wrote my chunked encoder wrapper.  If I received a value of >=0 I just set
> INFILESIZE to that.  If I recv'd < 0, that signalled me to perform a
> chunked transfer.

This is not a bad idea, but a bit too restricted to PUT requests. In the test
case I did this change for, I performed a multi-part formpost transfered as
chunked, and for such transfers the application doesn't set the INFILESIZE to
anything, as it doesn't make sense in this context.

All kinds of requests that send off data to the server should be able to get
it sent chunked.

--

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
(Continue reading)

Soren Spies | 2 Dec 03:23 2002
Picon

SSL_VERIFYPEER=FALSE workaround also needs VERIFYHOST=1?


On Monday, Nov 11, 2002, at 13:55 US/Pacific, Daniel Stenberg wrote:

>  2.  curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);

In trying to use this workaround (on a system with no default bundle 
installed), I had to look at the curl(1) source and add the line:
     curl_easy_setopt(tempCURL, CURLOPT_SSL_VERIFYHOST, 1);  // also 
needed

Should I have had to do that?  Should it be documented?  I also noticed 
that TOT curl_easy_setopt.3 doesn't document current functionality:

>        CURLOPT_SSL_VERIFYPEER
>            Pass  a  long  that is set to a non-zero value to make
>            curl verify the peer's certificate. The certificate to
>            verify   against  must  be  specified  with  the  CUR-
>            LOPT_CAINFO option (Added in 7.4.2) or  a  certificate
>            directory  must  be  specified with the CURLOPT_CAPATH
>            option (Added in 7.9.8).

Here's a diff to make it somewhat more up to date:
!cvs diff docs/libcurl/curl_easy_setopt.3
Index: docs/libcurl/curl_easy_setopt.3
===================================================================
RCS file: /cvsroot/curl/curl/docs/libcurl/curl_easy_setopt.3,v
retrieving revision 1.26
diff -T -u -p -b -r1.26 curl_easy_setopt.3
--- docs/libcurl/curl_easy_setopt.3     1 Dec 2002 11:23:06 -0000       
1.26
(Continue reading)

Daniel Stenberg | 2 Dec 07:45 2002
Picon

Re: SSL_VERIFYPEER=FALSE workaround also needs VERIFYHOST=1?

On Sun, 1 Dec 2002, Soren Spies wrote:

> >  2.  curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
>
> In trying to use this workaround (on a system with no default bundle
> installed), I had to look at the curl(1) source and add the line:
>      curl_easy_setopt(tempCURL, CURLOPT_SSL_VERIFYHOST, 1);  // also
> needed
>
> Should I have had to do that?  Should it be documented?

SSL_VERIFYHOST makes sure that the host name used in the server's certificate
matches the host name you're using. It isn't strictly connected to the
SSL_VERIFYPEER option.

But it should be documented, yes.

You may be getting problems with SSL_VERIFYHOST set to 2 due to curl's
current inability to understand wildcards in the name field:
http://sourceforge.net/tracker/index.php?func=detail&aid=634700&group_id=976&atid=100976

> I also noticed that TOT curl_easy_setopt.3 doesn't document current
> functionality:

> Here's a diff to make it somewhat more up to date:

[snip]

Thanks, I'm applying!

(Continue reading)

Daniel Stenberg | 2 Dec 16:37 2002
Picon

Re: CURLOPT_HEADERFUNCTION with non-HTTP response ?

On Sat, 30 Nov 2002, ruffnex wrote:

> Attached are patches & documentation to libcurl 7.10.2 to implement
> CURLOPT_HTTP200ALIASES.

Thanks for your efforts, but I'd prefer to see it adjusted a bit before I can
try it out for real:

1. Use diff -u, otherwise I can't apply it properly on my sources (since they
   have changed since the version you made your diff against)

2. Please don't write source code wider than 79 columns.

3. I'd say that the code for checking for the aliases would better be placed
   in a separate function rather than having the code duplicated.

--

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.

-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en

Daniel Stenberg | 2 Dec 16:27 2002
Picon

Re: win32: running_handles == 0 ?

On Sat, 30 Nov 2002, Yet Another Geek wrote:

> try running on Windows, the app gets caught in the loop - running_handles
> never reaches zero.

Perhaps it helps if you could rewrite the program using the plain C interface
and post it here, so that we all can try it out and possibly detect an error.

A general advice would be to always make sure to call curl_multi_perform()
again if it returns CURLM_CALL_MULTI_PERFORM, and not select() until it no
longer returns that.

--

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.

-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en

lupusdacicus | 2 Dec 22:03 2002
Picon

CPAN.org

Have you ever thpught of making libcurl available on the public perl network
?
I wasn't able to get libcurl installed on windows, oviously I am doing
something wrong and I guess I am in a dead end. I wrote to ActiveState and
asked them if they can include libcurl on their PPD database, which would
simplify a lot the intallation of the module on Active state free perl
client for windows. And I was told that they have a robot that take the
modules from cpan.org, so what my questions are:

1- Can you include libcurl (perl interface) on cpan.org ?
2- Can you contact Active State and see if you can get them to include
libcurl in their PPD database (that anyone can access like "install
Curl::Easy", which is all needed to be done to download and install a module
from their database)?

Respectfully,
Nick.

-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en

Daniel Stenberg | 3 Dec 08:54 2002
Picon

Re: CPAN.org

On Mon, 2 Dec 2002, lupusdacicus wrote:

> Have you ever thought of making libcurl available on the public perl
> network ?

Cris Bailiff, our master of the Perl binding, posted this:

	http://archive.develooper.com/modules <at> perl.org/msg14357.html

... a while ago, and I'm sure he'll appreciate your feedback and help in
order to proceed with this.

--

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.

-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en

Nilesh Simaria | 3 Dec 14:41 2002
Picon

libcurl and SIGALRM


Hello,

I am using libcurl for ftpupload and ftpdownload.
Sometimes I am able to upload file successfully,
and sometimes I am getting error No 28,  "Transfer aborted due to select() error".

But when I remove code which sends SIGALRM, ftpupload works fine.
But the code which sends SIGALRM everyafter 1 sec is very
important in my application. How can I go with both, libcurl and alarm.

Many thanks in advance.
Nilesh.

-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en

Daniel Stenberg | 3 Dec 10:20 2002
Picon

Re: libcurl and SIGALRM

On Tue, 3 Dec 2002, Nilesh Simaria wrote:

> I am using libcurl for ftpupload and ftpdownload. Sometimes I am able to
> upload file successfully, and sometimes I am getting error No 28, "Transfer
> aborted due to select() error".

select error? Weird. Can you add a check for what 'errno' contains when that
happens? (around line 250 in lib/ftp.c)

> But when I remove code which sends SIGALRM, ftpupload works fine.

Which code is this? The timeout code in libcurl or are you talking about some
other code?

> But the code which sends SIGALRM everyafter 1 sec is very important in my
> application. How can I go with both, libcurl and alarm.

You must make sure that your signal handler that receives the SIGALRM does
not abort the system call. SA_RESTART is the key to success!

--

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.

-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en

Yet Another Geek | 3 Dec 13:23 2002
Picon

Re: win32: running_handles == 0 ?

On Sat, 30 Nov 2002, Yet Another Geek wrote:

> > try running on Windows, the app gets caught in
> > the loop - running_handles never reaches zero.

> Perhaps it helps if you could rewrite the program 
> using the plain C interface and post it here, 
> so that we all can try it out and possibly detect 
> an error.

I tested this one:
  curlpas-7.10.2/docs/examples/multi-double.c
and I have the same problem with it.

> A general advice would be to always make sure to 
> call curl_multi_perform() again if it returns 
> CURLM_CALL_MULTI_PERFORM, and not select() until 
> it no longer returns that.

YES!!! That solves the problem. 

The examples don't do this ...

diff -u old/multi-double.c new/multi-double.c
--- old/multi-double.c  Tue Dec  3 05:47:04 2002
+++ new/multi-double.c  Tue Dec  3 05:51:58 2002
 <at>  <at>  -80,7 +80,8  <at>  <at> 
     case 0:
     default:
       /* timeout or readable/writable sockets */
(Continue reading)


Gmane