cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Can't post with Content-Length longer than 1024 bytes

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Sat, 16 Feb 2008 22:52:14 -0800

On Sat, Feb 16, 2008 at 10:22:02PM -0700, liofc leaveiton wrote:
> Hello,
> I'm trying to automate a posting mechanism to forums, and as such, I often have
> messages that are fairly long, typically between 8k and 12k in size. I'm using
> the -d "name=data" approach, and after many trial and error attempts, I've
> determined that if the data adds up to a Content-Length longer than 1024 bytes,
> curl doesn't properly send the POST data, and the server answers back with
> error 417.

Chances are that's the point where curl starts sending a 100-continue request.
You can disable that with the -0 switch.

> I'm looking for a work-around, while at the same time i guess I'll takle the
> source code (I've compiled version 7.18) and try changing any 1024 I find to
> something larger and see if it helps.
>
> I'm not even sure at this point if it might be a bash command line limit,
> although I suspect not since running the "ulimit" command showed that most
> limits were set to "unlimited".
>
> Any help would be appreciated!

If the server sends a 417 error code, curl ought to resend the request without
the 100-continue header. If it's not doing this, curl ought to be fixed.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-02-17