cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: trouble with SSL URL

From: David Byron <DByron_at_everdreamcorp.com>
Date: Tue, 8 Feb 2005 10:02:56 -0800

On Fri, 4 Feb 2005, Daniel Stenberg wrote:

> Why would it return an error? There should be one more byte
> to read.

I'm not sure. Maybe it was some side effect of running inside gdb, and
single stepping, etc.

There is one more byte to read as far as I can tell. It looks like more
than one based on stdout, but looking into the --trace-ascii file,
there's only one left.

> Your review and questioning bring up interesting issues.
>
> If POLLERR is a critical condition on the connection, I
> guess Curl_select() can just as well return -1 as that is
> detected better in the current source.
>
> Or would it be a point for callers of this function to
> differ between poll() returning failure to actually getting
> an error on the connection?

I was hoping someone would add some insight here. For my part, I'd
rather not guess what the caller cares about and give them all the
information we've got. Also, since Curl_select potentially gives info
about more than one socket, it could be useful to know the flags on each
one instead of just getting -1.

I coded up some extra checking for CSELECT_ERR and didn't come with any
new information though.

I should probably know the answer to this too, but how come Transfer()
in transfer calls Curl_select with a timeout and then if everything's OK
calls Curl_readwrite which immediately calls Curl_select again with a
timeout of 0?

Time to dive in and write the openssl test program.

-DB
Received on 2005-02-08