1

I have been unable to find the problem with my CURL command (in Linux) that works under Windows, but fails when run under Linux.

You can see below the transcript of the curl POST command which succeeds in uploading an XML file attachment under Windows, but errors with:

  • additional stuff not fine transfer.c:1037: 0 0

when run under Linux.

I have tried removing the ;type=text/xml suffix on the contentXml=@ portion of the command but this makes no difference. I have also tried using Chrome's 'inspect element' to monitor the same content in a HTML form but the output form that is not helpful.

I feel like I am missing a small (essential!) thing. Does anyone have any suggestions on what I am missing?

Any help appreciated sincerely.

-----WINDOWS--WORKS--OK------

C:\Users\>curl -k -v -X POST -F "contentName=spotlight" -F "unityRemoteUsername=aaa" -F "unityRemotePassword=aaa" -F " contentXml=@outputSpotlights.xml;type=text/xml" -F "contentXmlFileAction=upload" "https://www.example.com/admin.aspx?a=content.uploadxmlprocess&unityRemoteRequest=1" >log-spotlight_01.txt

* Adding handle: conn: 0x1d6aea0
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x1d6aea0) send_pipe: 1, recv_pipe: 0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*
About to connect() to www.example.com port 443 (#0)
*   Trying 111.222.33.444...
* Connected to www.example.com (111.222.33.444) port 443 (#0)
* SSLv3, TLS handshake, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Server hello (2):
{ [data not shown]
* SSLv3, TLS handshake, CERT (11):
{ [data not shown]
* SSLv3, TLS handshake, Server key exchange (12):
{ [data not shown]
* SSLv3, TLS handshake, Server finished (14):
{ [data not shown]
* SSLv3, TLS handshake, Client key exchange (16):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Finished (20):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
{ [data not shown]
* SSLv3, TLS handshake, Finished (20):
{ [data not shown]
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
*        subject: OU=Domain Control Validated; OU=Hosted by; O
U=COMODO SSL; CN=www.example.com
*        start date: 2013
*        expire date: 2016
*        issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN
=COMODO RSA Domain Validation Secure Server CA
*        SSL certificate verify result: self signed certificate in certificate c
hain (19), continuing anyway.
> POST /admin.aspx?a=content.uploadxmlprocess&unityRemoteRequest=1 HTTP/1.1
> User-Agent: curl/7.32.0
> Host: www.example.com
> Accept: */*
> Content-Length: 1894
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=------------------------b4a30d5f4f
02e40b
>
< HTTP/1.1 100 Continue
} [data not shown]
< HTTP/1.1 200 OK
< Cache-Control: private
< Content-Type: text/xml; charset=utf-8
* Server Microsoft-IIS/8.0 is not blacklisted
< Server: Microsoft-IIS/8.0
< Set-Cookie: ASP.NET_SessionId=myp1fxahmvil4p450mlkvy55; path=/; HttpOnly
< X-AspNet-Version: 2.0.50727
< X-Server-Name: www.example.com
< X-Powered-By: ASP.NET
< Date: Fri, 29 Apr 2016 05:01:55 GMT
< Content-Length: 4804
< Set-Cookie: DCW=!YurETMEX+uJDlGsjwPb80U37Lbn8yAZFhJDfC3k/kBCRszzy7sdlEoNLnqW2U
U6om/d+TTG8sc+WQaQ=; path=/
< Vary: Accept-Encoding
<
{ [data not shown]
100  6698  100  4804  100  1894   8798   3468 --:--:-- --:--:-- --:--:--  8798
* Connection #0 to host www.example.com left intact

C:\Users\>




----LINUX---FAILS----

me@LINUX:~/xml/$ curl -k -v -X POST -F "contentName=spotlight" -F "unityRemoteUsername=aaa" -F "unityRemotePassword=bbb" -F "contentXml=@outputSpotlights.xml;type=text/xml" -F "contentXmlFileAction=upload" "https://www.example.com/admin.aspx?a=content.uploadxmlprocess&unityRemoteRequest=1" >log-spotlight_01.txt
* About to connect() to www.example.com port 443 (#0)
*   Trying 111.222.33.444...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* connected
* Connected to www.example.com (111.222.33.444) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Server hello (2):
{ [data not shown]
* SSLv3, TLS handshake, CERT (11):
{ [data not shown]
* SSLv3, TLS handshake, Server key exchange (12):
{ [data not shown]
* SSLv3, TLS handshake, Server finished (14):
{ [data not shown]
* SSLv3, TLS handshake, Client key exchange (16):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
} [data not shown]
* SSLv3, TLS handshake, Finished (20):
} [data not shown]
* SSLv3, TLS change cipher, Client hello (1):
{ [data not shown]
* SSLv3, TLS handshake, Finished (20):
{ [data not shown]
* SSL connection using DHE-RSA-AES256-GCM-SHA384
* Server certificate:
*        subject: OU=Domain Control Validated; OU=Hosted by ; OU=COMODO SSL; CN=www.example.com
*        start date: 2013
*        expire date: 2016
*        issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN=COMODO RSA Domain Validation Secure Server CA
*        SSL certificate verify ok.
> POST /admin.aspx?a=content.uploadxmlprocess&unityRemoteRequest=1 HTTP/1.1
> User-Agent: curl/7.26.0
> Host: www.example.com
> Accept: */*
> Content-Length: 1840
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------b59711af552e
>
* additional stuff not fine transfer.c:1037: 0 0
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 100 Continue
  0  1840    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* additional stuff not fine transfer.c:1037: 0 0
} [data not shown]
* additional stuff not fine transfer.c:1037: 0 0
} [data not shown]
* additional stuff not fine transfer.c:1037: 0 0
} [data not shown]
* additional stuff not fine transfer.c:1037: 0 0
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 200 OK
< Cache-Control: private
< Content-Type: text/xml; charset=utf-8
< Server: Microsoft-IIS/8.0
< X-AspNet-Version: 2.0.50727
< X-Server-Name: www.example.com
< X-Powered-By: ASP.NET
< Date: Fri, 29 Apr 2016 05:02:22 GMT
< Content-Length: 100
< Set-Cookie: DCW=!QdorcUlrlaR+qA4jwPb80U37Lbn8yDOhcW/oNikxhZm8kVcjfFQuS+kjHbekv0xdGtQM5pDBv2UgMNA=; path=/
<
{ [data not shown]
100  1940  100   100  100  1840    354   6527 --:--:-- --:--:-- --:--:--  7389
* Connection #0 to host www.example.com left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
} [data not shown]

me@LINUX:~/xml/
munster
  • 13
  • 3
  • The contents of Linux terminal is actually more interesting than Windows – Ruslan Osmanov Apr 29 '16 at 05:42
  • did you check this thread: http://stackoverflow.com/questions/13943181/why-is-curl-returning-additional-stuff-not-fine – Aydin K. Apr 29 '16 at 05:46
  • Thanks for the link and advice to upgrade Curl. I have run up a new Debian 8 VM with curl 7.38.0 installed and I still get an error. This time it does not report the **additional stuff not fine transfer.c:1037: 0 0** so I think this was not the problem as other threads point out this message is benign. The system spits back **Remote login failed.** – munster May 02 '16 at 07:03

0 Answers0