Re: Test for valid URL?
Re: Test for valid URL?
- Subject: Re: Test for valid URL?
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 16 Sep 2010 14:42:44 -0400
"do shell script" throws an error if the command exits with nonzero
status, so curl must not be doing that. Or else there's a try block
around the do shell call...
On Thursday, September 16, 2010, Doug McNutt <email@hidden> wrote:
> At 12:46 -0500 9/16/10, Michael Grant wrote:
>>Neither
>>open location "some random string"
>>nor
>>do shell script "curl some random string"
>>
>>actually returns an error on my system (the first one returns nothing,
>>the second returns an empty string), and they both just fail silently
>>
>>
> curl returns its error messages to STDERR and returns a status to the shell with 0 (zero) being OK.
>
> I'm sure there is a way to persuade do shell script to show that stuff. Something like:
>
> set ercode = do shell script "curl some random string 2>1"
>
> But it's likely that curl would get a 401 error code from a site and be perfectly happy with it. Would that be a "valid" URL? Curl also returns the content of a valid URL in STDOUT unless you redirect it to using -c /dev/null.
> --
>
> --> From the U S of A, the only socialist country that refuses to admit it. <--
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden