Mark Fleming | 2 Feb 2004 00:47

Multi-file sequence download bug:

Hi,

I think I found an output bug on OS X 10.2.8 with default install of  
Curl
curl -V
curl 7.7.2 (powerpc-apple-darwin6.0) libcurl 7.7.2 (OpenSSL 0.9.6b) .

Multi-file sequence download bug:

First file is download to the output file (1.JPG), but 2 file goes to  
Standard output not to the file 2.JPG.

Command I used were:

curl --url  
http://www.scriptsoftware.com/Content/full/iClockThemes/TileMosaic/[1- 
12].JPG -o  "#1.JPG"

curl --url  
http://www.scriptsoftware.com/Content/full/iClockThemes/TileMosaic/ 
{1,2,3,4,5,6}.JPG -o "/Library/Application Support/Script  
Software/Themes/TileMosaic/#1.JPG"

---
Mark Fleming, Photographer and Software Author.
45 Aragon Road, RR#1 Glenburnie, Ontario,  Canada, K0H 1S0
www.ImageMontage.com, www.scriptsoftware.com
Check out iClock at: http://www.scriptsoftware.com/iclock/

-------------------------------------------------------
(Continue reading)

Daniel Stenberg | 2 Feb 2004 10:05
Picon
Favicon

Re: MIME headers

On Fri, 30 Jan 2004, Kristopher Spencer-Yates wrote:

> Just an update:  cURL is sending its own headers, which are not what I
> defined in $mime_headers.
>
> $mime_headers is like so:
>
> <? $mime_headers="POST /AUTHORIZE HTTP/1.0\nMIME-Version:
> 1.0\nContent-type: application/X1"; ?>
>
> ..and so on..

I don't understand how the command line looks like that you're trying to use.
Can you show us the full command line, as it looks when the variables are
expanded ?

> cURL just ignores my -H and does whatever it does by default.

I noticed there was no test case verifying this functionality, so I just added
test case 97 that does pretty much exactly what you're asking for here and it
worked just as expected for me.

--

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
(Continue reading)

Daniel Stenberg | 2 Feb 2004 10:13
Picon
Favicon

Re: globbing ftp uploads

On Fri, 30 Jan 2004, Doug McNutt wrote:

> This is what I did using a tcsh shell under Mac OS 10.2.3 with curl as
> delivered by Apple.:
>
> cd /Volumes/HEAO/MacBattery/Slides50k
> foreach fff (*.jpg)
>   curl -n ftp://macnauchtan.com/public_html/pub/MacBattery/Slides50k/ -T $fff
> end
>
> It worked like a charm and I don't do things like that very often but. . .
>
> In an academic learning context, is there some way I could have used {}
> notation to ask curl to glob the 21 files and effect the transfer without
> the overhead of repeated connections?

You'd need to upgrade your curl first, since the upload globbing was not
supported until curl 7.10.8 and I don't think that is included in your OS
release.

Then, you'd probably do something like this:

 * loop through all files and create a single uploadglob variable

 * uploadglob should look like this {file1,file2,file3}

 * then upload them all in one shot like this: curl ftp://upload.com/path/ -T
   $uploadglob

--

-- 
(Continue reading)

Daniel Stenberg | 2 Feb 2004 11:12
Picon
Favicon

Re: ssl is broken broken (Re: ANNOUNCE: curl and libcurl 7.11.0)

On Sat, 31 Jan 2004, Domenico Andreoli wrote:

> it seems that this bug has been introduced between release 1.75 and 1.76 of
> lib/ca-bundle.h for the same reason i consider it a bug.

lib/ca-bundle.h has no version number, it is generated. Or were you referring
to the lib/Makefile.am version?

> IMHO it is not so clean to assume a particular search order of the include
> paths, unless you impose it (i did not look who is choosing the order here).

Actually, we don't assume a search order, we have it set fine in the Makefile.
The problem here is that previously we generated the new ca-bundle.h in the
source dir instead of in the build dir, and I recently fixed this bad
behavior.

What I didn't fix was the include line in url.c, see patch below.

Proven here, we don't have any test cases that verify the cacert
functionality. I'm hoping Peter Sylvester's upcoming work on the test suite
will address this shortcoming.

> simply removing srcdir/lib/ca-bundle.h solved my problem. why this file is
> distirbuted? it is useless and it gets updated since the first build.

It is useless on all *nix machines. It is not useless on a lot of other
machines.

Patch:

(Continue reading)

kris | 2 Feb 2004 14:47

Re: MIME headers


>>$mime_headers is like so:
>>
>><? $mime_headers="POST /AUTHORIZE HTTP/1.0\nMIME-Version:
>>1.0\nContent-type: application/X1"; ?>
>>
>>..and so on..
>>    
>>
>
>I don't understand how the command line looks like that you're trying to use.
>Can you show us the full command line, as it looks when the variables are
>expanded ?
>
>  
>
Hello, and thank you for the reply.  I dont know how to show you the 
command line.  I've never seen it either.  I didn't know there was a 
way.  I am using
PHP to exec() the command so I assume what is inside exec("") in my 
previous email was how you would type it directly to the command line.  
See my first post to
the list for this information I beleive.

How do I see test case 97?  What are you talking about exactly?  Is this 
something available on the web?  I would like to see cURL do exactly 
what I'm asking for too!   :)  Thanks,   A URL would be nice... Thank you,

Kris??

(Continue reading)

Daniel Stenberg | 2 Feb 2004 14:57
Picon
Favicon

Re: MIME headers

On Mon, 2 Feb 2004, kris wrote:

> Hello, and thank you for the reply.  I dont know how to show you the command
> line.  I've never seen it either.  I didn't know there was a way.

Uh, well me neither but then we have a problem. What if you just replace the
exec() with a print or echo or something, won't that just display the line
intead of trying to run it as a shell command?

> I am using PHP to exec() the command so I assume what is inside exec("") in
> my previous email was how you would type it directly to the command line.

Well, I can do 'curl -d POSTDATA -H "Content-Type: myown/fake-fake" [URL]' and
it works just as expected.

> How do I see test case 97?

Since I just wrote it, it is only available in CVS (dev sources). The point I
was trying to make with the talk of test case 97 was not so much to show you
the test case but to say that I can make curl do this.

> What are you talking about exactly?

It is a new test in the curl test suite.

> Is this something available on the web?

Yes, you can see the data file used for it here:
http://cvs.php.net/co.php/curl/tests/data/test97?r=1.1

(Continue reading)

kris | 2 Feb 2004 16:11

Re: MIME headers

Hi Daniel,

Here is my output.  I just have one -H "{headers}"  with \n between each 
header I want.  Is this right or do I need a
-H "{header}"  for each header to be sent?  Thanks again for your help.  
I looked at the test case and it looks like what I'm doing below, as far 
as I can tell.
Hopefully we can figure it out.  Thanks again - PS - I'm :

# curl --version
curl 7.10.8 (i386-portbld-freebsd4.8) libcurl/7.10.8 OpenSSL/0.9.7a 
zlib/1.1.4
Protocols: ftp gopher telnet dict ldap http file https ftps
Features: SSL libz NTLM

Hope this helps - - Let me know if I can provide anything else.  I'm 
hoping to put this to bed early this week.  Thanks again - Kris
OUTPUT:

/usr/local/bin/curl -m 120 -H "POST /AUTHORIZE HTTP/1.0
MIME-Version: 1.0
Content-type: application/PTI21
Content-length: 1278
Content-transfer-encoding: text
Request-number: 1
Document-type: Request

" -d "<Request><AC><CommonData>	<CommonMandatory AuthOverrideInd="N" LangInd="00"
CardHolderAttendanceInd="01" HcsTcsInd="T" TxCatg="7" MessageType="A" Version="2"
TzCode="xxx">	<AccountNum AccountTypeInd="xx"></AccountNum><POSDetails
(Continue reading)

Mato Mira, Fernando | 2 Feb 2004 16:12
Picon

-b

I've read the man page and I don't understand what should be the format
for sending multiple cookies in the command line. Do you have an example?

Thanks

--
Fernando Mato Mira                           matomira <at> acm.org
Thomson Dialog

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

Sebastien WILLEMIJNS | 2 Feb 2004 15:58

about "-m" on windows systems

hello,

it is true that "-m" function doesn't works well in windows 98 SE
systems...

-m/--max-time <seconds> 
Maximum time in seconds that you allow the whole operation to take. 
This is useful for preventing your batch jobs from hanging for hours 
due to slow networks or links going down. This doesn't work fully in 
win32 systems.

... but i think for a similar function (by security) who stops CURL
after a "pre-defined time" sic !!!  i'm not happy when CURL waits
for nothing since a long time :X

I think CURL can capture the date and time of the beginning of 
session and capture again every X seconds to compare and giving
the "uptime" of the program processus... it is not logic but
it is the only solution (except the stupid "don't use windows") :X

Sébastien WILLEMIJNS
sebastien <at> willemijns.com

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

(Continue reading)

Daniel Stenberg | 2 Feb 2004 16:20
Picon
Favicon

Re: MIME headers

On Mon, 2 Feb 2004, kris wrote:

> Here is my output.  I just have one -H "{headers}"  with \n between each
> header I want.  Is this right or do I need a -H "{header}"  for each header
> to be sent?

The latter. Also note that 'POST' is not a header, it is the actual request
keyword, and you change that with -X. If you want to post to '/AUTHORIZE',
then use that in the URL. If you really need HTTP 1.0, then use -0/--http1.0
to make curl more stupid.

> /usr/local/bin/curl -m 120 -H "POST /AUTHORIZE HTTP/1.0
> MIME-Version: 1.0
> Content-type: application/PTI21
> Content-length: 1278
> Content-transfer-encoding: text
> Request-number: 1
> Document-type: Request

Also, try not to replace the Content-length: header, it will only cause you
problems (when you set it wrong by one byte or so). Let curl add its own
version of that header with the calculated size of the data.

--

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
(Continue reading)


Gmane