cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Apostrophe Causing "Output" To Fail?

From: Roth, Kevin P. <KPRoth_at_MAPLLC.com>
Date: Fri, 21 Nov 2003 09:22:21 -0500

-----Original Message-----
From: Art Pena
Sent: Friday, November 21, 2003 9:07 AM

> "curl --silent " + cameraSource + " --max-time 300 -w
> \"%{http_code}\\n\" --output Resources/Cache/cache.jpg"

> But if "cameraSource" is something like this, the file saved has errors:
> http://192.168.1.152/Webcam%20Repository/Jim's%20Webcam/001.jpg

> Could not open "cache.jpg" because a JPEG marker segment length is
> too short (the file may be truncate or incomplete)

Try opening the resulting output file in a text editor (rename it
to cache.txt if needed) and see what's in there. I wonder if you
won't find some kind of web server error rather than the image
data you're expecting.

If so, you might try playing around with the -f (--fail) option
to be better able to detect when this happens.

- Kevin

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Received on 2003-11-21