SSL Problems with 0.7.[78]

Igor Sysoev is at rambler-co.ru
Fri Aug 8 22:36:49 MSD 2008


On Fri, Aug 08, 2008 at 12:57:29PM +0200, Steffen Weber wrote:

> Igor Sysoev wrote:
> >On Thu, Aug 07, 2008 at 03:50:21PM -0400, jeff emminger wrote:
> >
> >>>Wait there was a change in src/event/ngx_event_openssl.c
> >>>
> >>>###
> >>>diff -ru nginx-0.7.6/src/event/ngx_event_openssl.c
> >>>nginx-0.7.7/src/event/ngx_event_openssl.c
> >>>--- nginx-0.7.6/src/event/ngx_event_openssl.c   2008-06-20
> >>>16:42:54.000000000 +0200
> >>>+++ nginx-0.7.7/src/event/ngx_event_openssl.c   2008-07-30
> >>>08:12:30.000000000 +0200
> >>>@@ -505,6 +505,9 @@
> >>>      if (n == 1) {
> >>> +        c->read->ready = 0;
> >>>+        c->write->ready = 1;
> >>>+
> >>>        if (ngx_handle_read_event(c->read, 0) == NGX_ERROR) {
> >>>            return NGX_ERROR;
> >>>        }
> >>>###
> >>>
> >>>Due the fact that I'am not so deep in the development, I don't know what
> >>>happen when you remove tis ;-)
> >>>
> >>FYI, Looks like that was the patch from thread "IMAP/SSL issue" on Jul 29.
> >
> >Yes, lines can be removed for HTTPS case to see whether they are the cause
> >of problem.
> 
> After removing the two lines, the problem is gone on both servers!

OK, the attached patch should fix the bug.


-- 
Igor Sysoev
http://sysoev.ru/en/
-------------- next part --------------
Index: src/event/ngx_event_openssl.c
===================================================================
--- src/event/ngx_event_openssl.c	(revision 1479)
+++ src/event/ngx_event_openssl.c	(working copy)
@@ -505,7 +505,10 @@
 
     if (n == 1) {
 
-        c->read->ready = 0;
+        if (ngx_event_flags & NGX_USE_LEVEL_EVENT) {
+            c->read->ready = 0;
+        }
+
         c->write->ready = 1;
 
         if (ngx_handle_read_event(c->read, 0) == NGX_ERROR) {


More information about the nginx mailing list