> for (nread = 0; nread < sizeof(buf); nread += err)
> {
> err = SSL_read(client_conn, buf + nread,
> sizeof(buf) - nread);
> if (err <= 0)
> break;
> }
Umm, this doesn't look like an HTTP protocol implementation. This looks like
code to read 1,024 bytes. Who says an HTTP request is exactly 1,024 bytes?
> for ( nwrite = 0; nwrite <= strlen(buf) ; )
> {
>
> werr =
> SSL_write(client_conn,buf,strlen(buf));
> printf ("Loop = %d", i++);
> if (werr <= 0 )
> {
> printf ("Write Error \n");
> continue;
> }
> nwrite += werr;
> }
This doesn't write all the data. It keeps writing the beginning of the data
as many times as needed to send a number of bytes equal to the total length
of the data. That doesn't seem to make much sense.
DS
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]