Time-outs with HTTPS

David Bovill david at openpartnership.net
Mon Aug 7 09:28:29 EDT 2006


Done some tests with https and the del.iri.us web service - and compared
these with using curl from the shell (via Revolution). Curl works, Rev does
not on OSX Panther using 2.7.0 and pretty well the latest libUrl I think:

https://runrev:runrev@api.del.icio.us/v1/posts/update
> socket timeout api.del.icio.us:443|6951
>
> curl -u runrev:runrev https://api.del.icio.us/v1/posts/update
>   % Total    % Received % Xferd  Average Speed          Time
> Curr.
>                                  Dload  Upload Total    Current  Left
> Speed
>
> 100    78    0    78    0     0      4      0 --:--:--  0:00:18
> --:--:--     4
> 100    78    0    78    0     0      4      0 --:--:--  0:00:18
> --:--:--     0
> <?xml version='1.0' standalone='yes'?>
> <update time="2006-08-07T13:11:15Z" />
>

I "set the socketTimeoutInterval to 50000" but even this is not much help.
Here are the scripts if they are of any help:

on mouseUp pMouseBtnNum
>     put "api.del.icio.us/v1/posts/update" into someUrl
>     -- put "api.del.icio.us/v1/tags/get" into someUrl
>     -- put "api.del.icio.us/v1/tags/bundles/all" into someUrl
>
>     put "runrev" into someUser
>     put "runrev" into pissWord
>
>     set the cursor to watch
>     put curl_GetUrl(someUrl, someUser, pissWord, "https", curlCommand)
> into curlResult
>     put rest_GetUrl(someUrl, someUser, pissWord, "https", restUrl) into
> restResult
>
>     put restUrl & CR & restResult & CR & CR & curlCommand & CR &
> curlResult
>     pass mouseUp
> end mouseUp
>
> function rest_GetUrl someUrl, someUser, pissWord, someProtocol, @restUrl
>     if someProtocol is empty then put "http" into someProtocol
>     if someProtocol is "https" then
>         set the socketTimeoutInterval to 50000
>         libUrlSetSSLVerification false
>     else
>         set the socketTimeoutInterval to 10000
>     end if
>
>     put merge("https://[[someUser]]:[[pissWord]]@[[someUrl]]") into
> restUrl
>     get url restUrl
>
>     put the result into someResult
>     if the result is not empty then
>         return the result
>     else
>         return it
>     end if
> end rest_GetUrl
>
> function curl_GetUrl someUrl, someUser, pissWord, someProtocol,
> @curlCommand
>     if someProtocol is empty then put "http" into someProtocol
>
>     put merge("curl -u [[someUser]]:[[pissWord]]
> [[someProtocol]]://[[someUrl]]") into curlCommand
>     put shell(curlCommand) into shellResult
>
>     -- put line 1 to 3 of shellResult into curlResult
>     -- delete line 1 to 3 of shellResult
>     return shellResult -- may contain result lines if long.
> end curl_GetUrl
>



More information about the use-livecode mailing list