cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: HTTPS handshake bug ?

From: Daniel Stenberg <Daniel.Stenberg_at_haxx.nu>
Date: Mon, 29 May 2000 08:27:25 +0200 (MET DST)

On Sun, 28 May 2000 kamadoll_at_excite.com wrote:

> I seem to have fixed my problems

Goodie, nice piece of research there! ;-)

> the server I am trying to access wants to use POST methods only. The ASP
> pages on the server seem to hang on GET methods.

Hm, that sounds really weird. How does the browsers do that? They normally
only send posts when submitting a post-form.

> We seem to not be sending Content-Length headers unless we use a POST
> method

That is correct. AFAIK, there's nothing that requires a Content-Length for a
mere GET request.

> which is fine but if I use a -X POST directive and do not provide
> formdata with the -d switch, the server seems to hang on the connection
> anyway.

Doing -X requests is doing handicrafted requests and you should have a fairly
good idea about what you're doing to get it working correctly. POST requests
_should_ have a Content-Length: header. I'm not sure it is required in the
standards, but I am not aware of a single server implementation that won't
get into trouble if that's missing.

> Should we be sending Content-Length=0 in any case unless formdata is
> present when Content-Length will be strlen (formdata) ?

Use -H "Content-Length: 0". I can't see this as a real issue to change
anything in curl, it already does Content-Length properly for its built-in
POST support.

-- 
   Daniel Stenberg - http://www.contactor.se/~dast - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
Received on 2000-05-29