cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Apostrophe Causing "Output" To Fail?

From: Art Pena <apena_at_xnet.com>
Date: Fri, 21 Nov 2003 09:06:09 -0600

Hi Kevin,
Thanks for the tip. I did as you suggested, but it does appear to be
(the start of) a valid image file:

GIF89a

And if I copy/paste the URL I'm trying to pull the image from into a
browser, it does indeed display in the browser. What else could an
apostrophe be causing? Or, how can I incorporate "-f" into my string to
try and debug (I really am just learning about what CURL is/does)?

Thanks again,
AP

On Friday, November 21, 2003, at 08:22 AM, Roth, Kevin P. wrote:

> -----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/
>

-------------------------------------------------------
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