curl-users
POST XML exceed 1024 bytes?!
Date: Wed, 7 Feb 2007 08:16:26 +0800
Dear all,
I have been playing with the API using Curl and I am not sure where the limitation I am seeing is coming from, but I cannot put more than 1024 chars, including the needed XML, into the the body of a page.
Here is some output using curl -v with the tokens and text file content removed, first a failing case with exactly 1024 bytes, then a working case with 1023 bytes:
--------------------------------------------------------------------------------
curl -v -H 'Content-Type: xml' -d @tmp.txt http://123.com
* About to connect() to 123.com port 80
* Trying 123.213.12.10... connected
* Connected to 123.com (123.213.12.10) port 80
> POST /page/here_body HTTP/1.1
> User-Agent: curl/7.15.4 (i686-pc-cygwin) libcurl/7.15.4 OpenSSL/0.9.8d zlib/1.2.3
> Host: 123.com
> Accept: */*
> Content-Type: xml
> Content-Length: 1024
> Content-Type: application/x-www-form-urlencoded
> Expect: 100-continue
>
< HTTP/1.1 417 Expectation Failed
< Connection: close
< Content-Length: 0
< Date: Wed, 20 Dec 2006 23:37:34 GMT
< Server: lighttpd/1.4.11
* Closing connection #0
--------------------------------------------------------------------------------
curl -v -H 'Content-Type: xml' -d @tmp.txt http://123.com
* About to connect() to 123.com port 80
* Trying 123.213.12.10... connected
* Connected to 123.com (123.213.12.10) port 80
> POST /page/here_body HTTP/1.1
> User-Agent: curl/7.15.4 (i686-pc-cygwin) libcurl/7.15.4 OpenSSL/0.9.8d zlib/1.2.3
> Host: 123.com
> Accept: */*
> Content-Type: xml
> Content-Length: 1023
> Content-Type: application/x-www-form-urlencoded
>
> <request><token>xxxxxxxxxxxxxxxxxxxxxxx</token><page><descrip
tion>
...
File Contents
...
> </description></page></request>
< HTTP/1.1 200 OK
< Transfer-Encoding: chunked
< Content-Type: text/xml
< Cache-Control: no-cache
< Date: Wed, 20 Dec 2006 23:37:51 GMT
< Server: lighttpd/1.4.11
* Connection #0 to host 123.com left intact
* Closing connection #0
<?xml version="1.0" encoding="UTF-8"?><response success="true"></response>
--------------------------------------------------------------------------------
I must add many thousands of bytes to a body via the web page. How do I post correctlly?!
Thanks in advance for your help! Thanks !
++schawk++
Received on 2007-02-07