cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: strange behavior on some machines

From: mihir gore <mihirgore_at_hotmail.com>
Date: Fri, 07 Jul 2006 18:19:34 +0530

here is the trace of http request for on the machine where my code fails:

POST /arun/mt/mt-xmlrpc.cgi HTTP/1.1Host: 10.192.37.21Pragma:
no-cacheAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
*/*Content-type: text/xmlContent-Length: 1060< HTTP/1.1 100 ContinueServer:
Microsoft-IIS/5.0Date: Fri, 07 Jul 2006 10:04:18 GMT<?xml version="1.0"
encoding="UTF-8"?>
<methodCall>
        <methodName>metaWeblog.newPost</methodName>
        <params>
                <param>
                        <value><string>9</string></value>
                </param>
                <param>
                        <value><string>ctqa</string></value>
                </param>
                <param>
                        <value><string>ctqa</string></value>
                </param>
                <param>
                        <value>
                        <struct>
                                <member>
                                        <name>description</name>
                                        <value><string>##CONTENT##</string></value>
                                </member>
                                <member>
                                        <name>mt_allow_comments</name>
                                        <value><boolean>0</boolean></value>
                                </member>
                                <member>
                                        <name>mt_allow_pings</name>
                                        <value><boolean>0</boolean></value>
                                </member>
                                <member>
                                        <name>mt_convert_breaks</name>
                                        <value><boolean>0</boolean></value>
                                </member>
                                <member>
                                        <name>pubDate</name>
                                        <value><string>19700101T00:00:00</string></value>
                                </member>
                                <member>
                                        <name>title</name>
                                        <value><string>##TITLE##</string></value>
                                </member>
                        </struct>
                </value>
                </param>
                <param>
                        <value><boolean>1</boolean></value>
                </param>
        </params>
</methodCall>

< HTTP/1.1 200 OKContent-Length: 139
Content-Type: text/xml
SOAPServer: SOAP::Lite/Perl/0.52
< <?xml version="1.0"
encoding="UTF-8"?><methodResponse><params><param><value><string>1868</string></value></param></params></methodResponse>

>POST /arun/mt/mt-xmlrpc.cgi HTTP/1.1Host: 10.192.37.21Pragma:
>no-cacheAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
>*/*Content-type: text/xmlContent-Length: 314< HTTP/1.1 100 ContinueServer:
>Microsoft-IIS/5.0Date: Fri, 07 Jul 2006 10:04:20 GMT<?xml version="1.0"
>encoding="UTF-8"?>
<methodCall>
        <methodName>metaWeblog.getPost</methodName>
        <params>
                <param>
                        <value><string>1868</string></value>
                </param>
                <param>
                        <value><string>ctqa</string></value>
                </param>
                <param>
                        <value><string>ctqa</string></value>
                </param>
        </params>
</methodCall>

< HTTP/1.1 200 OKContent-Length: 1239
Content-Type: text/xml
SOAPServer: SOAP::Lite/Perl/0.52
< <?xml version="1.0" encoding="UTF-8"?><methodResponse</methodResponse>

>POST /arun/mt/mt-xmlrpc.cgi HTTP/1.1Host: 10.192.37.21Pragma:
>no-cacheAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
>*/*Content-type: text/xmlContent-Length: 316

here is the http trace for machines where it works.

POST /arun/mt/mt-xmlrpc.cgi HTTP/1.1Host: 10.192.37.21Pragma:
no-cacheAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
*/*Content-type: text/xmlContent-Length: 1060< HTTP/1.1 100 ContinueServer:
Microsoft-IIS/5.0Date: Fri, 07 Jul 2006 10:20:25 GMT<?xml version="1.0"
encoding="UTF-8"?>
<methodCall>
        <methodName>metaWeblog.newPost</methodName>
        <params>
                <param>
                        <value><string>9</string></value>
                </param>
                <param>
                        <value><string>ctqa</string></value>
                </param>
                <param>
                        <value><string>ctqa</string></value>
                </param>
                <param>
                        <value>
                        <struct>
                                <member>
                                        <name>description</name>
                                        <value><string>##CONTENT##</string></value>
                                </member>
                                <member>
                                        <name>mt_allow_comments</name>
                                        <value><boolean>0</boolean></value>
                                </member>
                                <member>
                                        <name>mt_allow_pings</name>
                                        <value><boolean>0</boolean></value>
                                </member>
                                <member>
                                        <name>mt_convert_breaks</name>
                                        <value><boolean>0</boolean></value>
                                </member>
                                <member>
                                        <name>pubDate</name>
                                        <value><string>19700101T00:00:00</string></value>
                                </member>
                                <member>
                                        <name>title</name>
                                        <value><string>##TITLE##</string></value>
                                </member>
                        </struct>
                </value>
                </param>
                <param>
                        <value><boolean>1</boolean></value>
                </param>
        </params>
</methodCall>

< HTTP/1.1 200 OKContent-Length: 139
Content-Type: text/xml
SOAPServer: SOAP::Lite/Perl/0.52
< <?xml version="1.0"
encoding="UTF-8"?><methodResponse><params><param><value><string>1869</string></value></param></params></methodResponse>

>POST /arun/mt/mt-xmlrpc.cgi HTTP/1.1Host: 10.192.37.21Pragma:
>no-cacheAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
>*/*Content-type: text/xmlContent-Length: 314< HTTP/1.1 100 ContinueServer:
>Microsoft-IIS/5.0Date: Fri, 07 Jul 2006 10:20:27 GMT<?xml version="1.0"
>encoding="UTF-8"?>
<methodCall>
        <methodName>metaWeblog.getPost</methodName>
        <params>
                <param>
                        <value><string>1869</string></value>
                </param>
                <param>
                        <value><string>ctqa</string></value>
                </param>
                <param>
                        <value><string>ctqa</string></value>
                </param>
        </params>
</methodCall>

< HTTP/1.1 200 OKContent-Length: 1239
Content-Type: text/xml
SOAPServer: SOAP::Lite/Perl/0.52
< <?xml version="1.0" encoding="UTF-8"?><methodResponse></methodResponse>

>POST /arun/mt/mt-xmlrpc.cgi HTTP/1.1Host: 10.192.37.21Pragma:
>no-cacheAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
>*/*Content-type: text/xmlContent-Length: 316

< HTTP/1.1 100 ContinueServer: Microsoft-IIS/5.0Date: Fri, 07 Jul 2006
10:20:27 GMT<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
        <methodName>mt.getPostCategories</methodName>
        <params>
                <param>
                        <value><string>1869</string></value>
                </param>
                <param>
                        <value><string>ctqa</string></value>
                </param>
                <param>
                        <value><string>ctqa</string></value>
                </param>
        </params>
</methodCall>

< HTTP/1.1 200 OKContent-Length: 140
Content-Type: text/xml
SOAPServer: SOAP::Lite/Perl/0.52
< <?xml version="1.0"
encoding="UTF-8"?><methodResponse><params><param><value><array><data/></array></value></param></params></methodResponse>

On machines where it does not work the last request seems to be coming out
even before receiving the response. I check with ethereal, the server is
sendign the http 200 message but before that the application is coming out.

Regards
Mihir

>From: Daniel Stenberg <daniel_at_haxx.se>
>Reply-To: libcurl development <curl-library_at_cool.haxx.se>
>To: mihirg_at_gmail.com, libcurl development <curl-library_at_cool.haxx.se>
>Subject: Re: strange behavior on some machines
>Date: Fri, 7 Jul 2006 09:41:50 +0200 (CEST)
>
>On Wed, 5 Jul 2006, mihir gore wrote:
>
>>However on some machines.
>>a. http post is sent to server with xml data
>>b. server acknowledges
>>c. server sends a 100 response
>>d. server sends a 200 response.
>>whats happening here is that the http status 100 sent causes curl to close
>>the socket, so the http 200 is not caught.
>
>Why does the 100 cause curl to close the socket? And when it does this,
>does the server reveal anything useful in its logs?
>
>>Alll machines have the same OS (windows xp), the server is IIS 5.0, ( I am
>>testing against moveable-type blog server).
>>
>>I am new to curl, please let me know if you need more info.
>
>Tell us what libcurl version you use.
>
>And then please show us as much as you can: what headers did libcurl send,
>what headers did it receive etc. Basically a DEBUGFUNCTION trace. Possibly
>you can debug this with the command line tool and use the --trace-ascii
>option.
>
>--
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-07-07