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 10:57:34 +0200 (MET DST)

On Thu, 6 Jun 2002, Arnaud VALLEE wrote:

> As i am making my first steps with libcurl, i have got a problem with a
> post request. My post request look like this:
>
> About to connect() to absinthe:80
> Connected to absinthe (192.168.1.50) port 80
> POST /TestCharge/submit/sub.jsp HTTP/1.0
> Host: absinthe
> Pragma: no-cache
> Connection: close
> User-Agent: myClientHttp
> Cache-Control: no-cache
> Content-Length: 19
> Content-Type: application/x-www-form-urlencoded
>
> var2=huphup&num=2

So, what's wrong with this request? I can only see one tiny glitch and that
is that the post data is not 19 bytes but 17. Still this looks like a pretty
nice HTTP compliant post.

What version of libcurl is this? The "HTTP/1.0" part makes it look rather
old...

"Connection: close" ? Did you enforce this header?

> The tomcat server send me this:

[bluergh]

Is that supposed to mean anything? I didn't get anything out of it anyway.

> I do almost exactly the same request with another http client the response
> from the web server is OK.

So how does that request look like? What kind of restrictions does your web
server set on the post request?

-- 
    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