cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: problem with post request on a TOMCAT server

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 7 Jun 2002 17:42:30 +0200 (MET DST)

On Fri, 7 Jun 2002, Arnaud VALLEE wrote:

[ My reply is CC'ed back to the libcurl list again ]

> Actually, i was trying to do exactly the same request as i did with the
> other http client i had. So that's why i force some headers like
> connection.

> I am using the last release of libcurl(7.9.7)

> >is that the post data is not 19 bytes but 17

> The other http client add CRLF ("\r\n") at the end of the data so content
> length 19. I supposed i add to do the same thing, even if i did not see
> this in the example provided with the release.I think this CRLF is
> mandatory for http request. Does LibCurl add it automatically?

No. If the CRLF is not part of the data, then it shouldn't be there nor
included in the counter. The Content-Length: describes the size of the data
it POSTs, not anything else. libcurl did include the extra CRLF for a long
time (but not anymore) but it never included them in the Content-Length:
counter.

AFAIK.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
Received on 2002-06-07