W3C home > Mailing lists > Public > www-lib@w3.org > October to December 2000

POSTing large files over SSL fails

From: <Ville.Alkkiomaki@sonera.com>
Date: Fri, 20 Oct 2000 13:51:00 +0300
Message-Id: <H00069401f777cf3.0972038298.hanhi.vallila.sonera.fi@MHS>
TO: www-lib@w3c.org
It seems that libwww hangs when POSTing large files over SSL. The library cannot
handle correctly OpenSSL's SSL_ERROR_WANT_WRITE return code when writing data.

This can be fixed by changing HTSSLWriter_write (in HTSSLWrite.c) as follows:

Change lines:

        case SSL_ERROR_WANT_WRITE:
            HTHost_register(host, net, HTEvent_WRITE);
            me->offset = wrtp - buf;
            HTTRACE(STREAM_TRACE, "HTSSLWriter. WOULD BLOCK %d (offset %d)\n" _
soc _ me->offset);
            return HT_WOULD_BLOCK;

To:

        case SSL_ERROR_WANT_WRITE:
            break;

I don't know if this breaks other things or if this is the best solution, but at
least it seems to work..

Your,

Ville Alkkiomäki
Received on Friday, 20 October 2000 06:51:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:38 GMT