socket handling/libURL changed between 4.0 and 4.6?

Web Admin Himalayan Academy katir at hindu.org
Sat Apr 9 21:28:08 EDT 2011


  Better push this one to a ticket in the QA center with a sample stack.

On 4/9/11 9:23 AM, Bernard Devlin wrote:
> I have some very simple code that works in 4.0 (on both Linux and
> Windows), but which fails on 4.6.  The code posts XML to a webserver
> and now fails on both Linux and Windows using 4.6.  It is making
> PROPFIND requests to a webdav server.  But fundamentally it is just
> HTTP request/response, and should work in 4.6 just as it works in 4.0.
>
> The problem manifests itself as a socket timeout on 4.6, but there is
> not timeout on 4.0.  The normal response times from the server are in
> a sub-4000 ms range, but even if I set the socketTimeoutInterval to
> 30000 ms, the code fails with a socket timeout. Reverting back to 4.0,
> and the same code works in a sub-4000 ms range with no timeout.
>
> on mouseUp
>     resetAll
>     put fld "request" into tXml
>     libURLSetCustomHTTPHeaders (fld "headers")  -- headers contains
> PROPFIND method
>     put "http://192.168.0.202:1980/" into tURL
>     try
>        wait 50 milliseconds with messages
>        post tXml to URL tURL
>     catch tError
>        put "error"&&  tError
>     finally
>        put the long time&  cr&  it&  cr&  the result into fld "response"
>        put the long time&  cr&   libUrlLastRhHeaders() into fld "ResponseHeaders"
>     end try
> end mouseUp
>
> The server has not changed, and I've tried alternatiing repeatedly
> between 4.0 and 4.6, and the problem is there consistently with 4.6
> and not at all with 4.0.
>
> I see in 4.5 there was a change to DNS resolution, so I tried adding a
> manual entry to my hosts file, but even though a browser can resolve
> the ip address from the hostname, Livecode still fails. With
> Revolution 4.0, it works with either IP address or a hostname resolved
> via lookup to the hosts file.
>
> I also put a HTTP inspector between the IDE and the server.  After
> setting the httpProxy, with 4.0 I can intercept the calls to the
> server and view them; but with 4.6 they do not even reach the HTTP
> inspector.
>
> I tried setting up libURL logging using:
>
>   libUrlSetLogField ("field"&&  quote&  "LogField"&  quote)
>
> but it didn't make any difference - logging doesn't seem to work on 4.0 or 4.6.
>
> I tried putting breakpoints inside the libURL handlers themselves, but
> they never seem to get triggered - not even on 4.0 where the "post to
> URL" is working.  Is there something I'm missing in how one should be
> able to step into the libURL code?
>
> Bernard Devlin
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>





More information about the use-livecode mailing list