On Wed, Nov 13, 2002 at 09:53:34AM -0800, Lin Ma wrote: > I have a client program using Openssl to send request to and receive > response from a web server. SSL_read hangs if the web server sends the > following headers. > > The following is the header dump without SSL. I think the problem is the > separator 0d 0a 0d 0a between the two block of headers.
No. The SSL layer does not care about the data transferred, whether it is line oriented or not. ... > You can see, it is like > HTTP/1.1 100 Continue > Server: Microsoft-IIS/5.0 > Date: Wed, 30 Oct 2002 06:34:56 GMT > 0d 0a 0d 0a > HTTP/1.1 200 OK > Server: Microsoft-IIS/5.0 > Date: Wed, 30 Oct 2002 06:34:56 GMT > Content-Length: 1863 > ..... > > There is separator 0d 0a 0d 0a between the two block of headers. My program > just stuck in the separator and couldn't get the following HTTP/1.1 200 OK > ... > > If I change it to non-blocking, SSL_read() doesn't hang any more, but it > keep getting SSL_ERROR_WANT_READ error, if I keeping SSL_read, it keep > getting SSL_ERROR_WANT_READ and doesn't return valid data. This means, that no data has been received or at least not enough data to complete the TLS record. SSL_read() is waiting for (more) data. Use ssldump to analyze the traffic. What platform are you working on? Windows or UNIX? Can you try your program on another platform? Microsoft IIS is not know to be free of errors, but it seems to work good enough that I don't think the problem is caused by the server side. Best regards, Lutz -- Lutz Jaenicke [EMAIL PROTECTED] http://www.aet.TU-Cottbus.DE/personen/jaenicke/ BTU Cottbus, Allgemeine Elektrotechnik Universitaetsplatz 3-4, D-03044 Cottbus ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]