You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by br...@apache.org on 2006/01/22 08:40:48 UTC

svn commit: r371227 - /httpd/httpd/branches/async-read-dev/modules/ssl/ssl_engine_io.c

Author: brianp
Date: Sat Jan 21 23:40:47 2006
New Revision: 371227

URL: http://svn.apache.org/viewcvs?rev=371227&view=rev
Log:
Force blocking reads in mod_ssl when running in an async MPM

Modified:
    httpd/httpd/branches/async-read-dev/modules/ssl/ssl_engine_io.c

Modified: httpd/httpd/branches/async-read-dev/modules/ssl/ssl_engine_io.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/async-read-dev/modules/ssl/ssl_engine_io.c?rev=371227&r1=371226&r2=371227&view=diff
==============================================================================
--- httpd/httpd/branches/async-read-dev/modules/ssl/ssl_engine_io.c (original)
+++ httpd/httpd/branches/async-read-dev/modules/ssl/ssl_engine_io.c Sat Jan 21 23:40:47 2006
@@ -459,6 +459,7 @@
     apr_read_type_e block = inctx->block;
     SSLConnRec *sslconn = myConnConfig(inctx->f->c);
 
+    fprintf(stderr, "block mode is %d\n", (block == APR_BLOCK_READ ? 1 : 0));
     inctx->rc = APR_SUCCESS;
 
     /* OpenSSL catches this case, so should we. */
@@ -1281,6 +1282,11 @@
         return APR_ENOTIMPL;
     }
 
+    /* XXX: for now, do blocking reads even if running in
+     * an asynchronous httpd.  mod_ssl will need some changes
+     * to deal with EAGAIN properly.
+     */
+    block = APR_BLOCK_READ;
     inctx->mode = mode;
     inctx->block = block;
 



Re: svn commit: r371227 - /httpd/httpd/branches/async-read-dev/modules/ssl/ssl_engine_io.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
brianp@apache.org wrote:
>  
> +    /* XXX: for now, do blocking reads even if running in
> +     * an asynchronous httpd.  mod_ssl will need some changes
> +     * to deal with EAGAIN properly.
> +     */
> +    block = APR_BLOCK_READ;

WHAT?!?  Absolute -1 veto.

I don't care how/what is going on, if the caller can do more work (the current
filter or end handler) without further results, we cannot block here the way
you have.  When they say we need to pause to actually obtain more bytes, by
passing APR_BLOCK_READ, then yes; we need to block.

This commit defeats all speculative read strategies.

Bill

Re: svn commit: r371227 - /httpd/httpd/branches/async-read-dev/modules/ssl/ssl_engine_io.c

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
brianp@apache.org wrote:
>  
> +    /* XXX: for now, do blocking reads even if running in
> +     * an asynchronous httpd.  mod_ssl will need some changes
> +     * to deal with EAGAIN properly.
> +     */
> +    block = APR_BLOCK_READ;

WHAT?!?  Absolute -1 veto.

I don't care how/what is going on, if the caller can do more work (the current
filter or end handler) without further results, we cannot block here the way
you have.  When they say we need to pause to actually obtain more bytes, by
passing APR_BLOCK_READ, then yes; we need to block.

This commit defeats all speculative read strategies.

Bill