cURL / Mailing Lists / curl-users / Single Mail

curl-users

Curl fails with content lenght > 1023

From: <junkmail_at_srjava.cjb.net>
Date: Sat, 14 Apr 2007 16:37:19 -0500

I'm using curl to post a form to the server. I have found that when
trying to submit a form with a content length of 1024 or greater curl
dies. It gives the following error: "Received problem 2 in the chunky
parser"

Is there a workaround to this bug to submit a larger form payload?

Version info:
curl 7.15.4 (i586-pc-mingw32msvc) libcurl/7.15.4 OpenSSL/0.9.7e zlib/1.2.2
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: Largefile NTLM SSL SSPI libz

Below is the output of 2 calls - the first has a content length= 1023
and works fine while the second with content length= 1024 fails.

-Scott

This works: (note the content length is less than 1024)
--------------------------------------------------
* About to connect() to my.domain.com port 443
* Trying 999.999.999.999... connected
* Connected to my.domain.com (999.999.999.999) port 443
* successfully set certificate verify locations:
* CAfile: C:\WINDOWS\system32\curl-ca-bundle.crt
  CApath: none
* SSLv2, Client hello (1):
SSLv3, TLS handshake, Server hello (2):
SSLv3, TLS handshake, CERT (11):
SSLv3, TLS handshake, Server finished (14):
SSLv3, TLS handshake, Client key exchange (16):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSL connection using DES-CBC3-SHA
* Server certificate:
* subject: [removed]
* start date: 2006-09-20 00:00:00 GMT
* expire date: 2008-09-19 23:59:59 GMT
* common name: my.domain.com (matched)
* issuer: /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting
cc/OU=Certification Services
Division/CN=Thawte Premium Server CA/emailAddress=premium-server_at_thawte.com
* SSL certificate verify ok.
> POST x/0VgpYtgrhCHzu63j/52ui2 HTTP/1.1
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4)
Gecko/20030624 Netscape/7.1 (a
x)
> Host: my.domain.com
> Accept: */*
> Referer: https://my.domain.com/login/
> Content-Length: 1023
> Content-Type: application/x-www-form-urlencoded
>
> [form payload data omitted here]
  ContinueHTTP/1.1 200 OK
< Connection: close
< Cache-control: no-cache; no-store
< Last-Modified: Sat, 14 Apr 2007 21:24:41 GMT
< Transfer-Encoding: chunked
< Date: Sat, 14 Apr 2007 21:24:41 GMT
< Vary: Accept-Encoding
< Content-Type: text/html; charset=ISO-8859-1;
< Server: Apache/1.3.34 (Unix) mod_gzip/1.3.26.1a mod_perl/1.29
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
* Closing connection #0

This fails: (note the content length is GTE 1024)
--------------------------------------------------
* About to connect() to my.domain.com port 443
* Trying 999.999.999.999... connected
* Connected to my.domain.com (999.999.999.999) port 443
* successfully set certificate verify locations:
* CAfile: C:\WINDOWS\system32\curl-ca-bundle.crt
  CApath: none
* SSLv2, Client hello (1):
SSLv3, TLS handshake, Server hello (2):
SSLv3, TLS handshake, CERT (11):
SSLv3, TLS handshake, Server finished (14):
SSLv3, TLS handshake, Client key exchange (16):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSLv3, TLS change cipher, Client hello (1):
SSLv3, TLS handshake, Finished (20):
SSL connection using DES-CBC3-SHA
* Server certificate:
* subject: [removed]
* start date: 2006-09-20 00:00:00 GMT
* expire date: 2008-09-19 23:59:59 GMT
* common name: my.domain.com (matched)
* issuer: /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting
cc/OU=Certification Services
Division/CN=Thawte Premium Server CA/emailAddress=premium-server_at_thawte.com
* SSL certificate verify ok.
> POST x/0VgpYtgrhCHzu63j/52ui2 HTTP/1.1
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4)
Gecko/20030624 Netscape/7.1 (a
x)
> Host: my.domain.com
> Accept: */*
> Referer: https://my.domain.com/login/
> Content-Length: 1024
> Content-Type: application/x-www-form-urlencoded
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
Connection: close
< Cache-control: no-cache; no-store
< Last-Modified: Sat, 14 Apr 2007 21:20:25 GMT
< Transfer-Encoding: chunked
< Date: Sat, 14 Apr 2007 21:20:24 GMT
< Vary: Accept-Encoding
< Content-Type: text/html; charset=ISO-8859-1;
< Server: Apache/1.3.34 (Unix) mod_gzip/1.3.26.1a mod_perl/1.29
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
Received problem 2 in the chunky parser
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
Received on 2007-04-14