httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/ssl ssl_engine_io.c
Date Fri, 01 Nov 2002 09:29:06 GMT
wrowe       2002/11/01 01:29:06

  Modified:    modules/ssl ssl_engine_io.c
  Log:
    Clean up the read pattern for cases when some data already exists.
    Also return APR_SUCCESS once we've gathered any decrypted bytes.
  
  Revision  Changes    Path
  1.87      +12 -2     httpd-2.0/modules/ssl/ssl_engine_io.c
  
  Index: ssl_engine_io.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_io.c,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- ssl_engine_io.c	1 Nov 2002 08:58:38 -0000	1.86
  +++ ssl_engine_io.c	1 Nov 2002 09:29:06 -0000	1.87
  @@ -656,9 +656,12 @@
               inctx->cbuf.length += bytes;
               return APR_SUCCESS;
           } 
  -        if ((*len >= wanted) || inctx->mode == AP_MODE_GETLINE) {
  +        if (*len >= wanted) {
               return APR_SUCCESS;
           }
  +        /* Down to a nonblock pattern as we have some data already
  +         */
  +        inctx->block = APR_NONBLOCK_READ;
       }
   
       while (1) {
  @@ -683,6 +686,9 @@
               if (APR_STATUS_IS_EAGAIN(inctx->rc)
                       || APR_STATUS_IS_EINTR(inctx->rc)) {
                   if (inctx->block == APR_NONBLOCK_READ) {
  +                    if (*len > 0) {
  +                        inctx->rc = APR_SUCCESS;
  +                    }
                       break;
                   }
               }
  @@ -703,8 +709,12 @@
                    * (This is usually the case when the client forces an SSL
                    * renegotation which is handled implicitly by OpenSSL.)
                    */
  +                inctx->rc = APR_EAGAIN;
  +
                   if (inctx->block == APR_NONBLOCK_READ) {
  -                    inctx->rc = APR_EAGAIN;
  +                    if (*len > 0) {
  +                        inctx->rc = APR_SUCCESS;
  +                    }
                       break; /* non fatal error */
                   }
               }
  
  
  

Mime
View raw message