]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_ssl: axe dead code.
authorYann Ylavic <ylavic@apache.org>
Fri, 26 Oct 2018 22:00:30 +0000 (22:00 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 26 Oct 2018 22:00:30 +0000 (22:00 +0000)
No functional change, we never get there when *len > 0.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1844928 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_io.c

index 37e8314b7ca38f5c09f7ffd1ceb8d1b0be482c71..229f0c0f1f41629d71f21171c819877dc23ca0f1 100644 (file)
@@ -741,7 +741,7 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx,
         rc = SSL_read(inctx->filter_ctx->pssl, buf + bytes, wanted - bytes);
 
         if (rc > 0) {
-            *len += rc;
+            *len = rc;
             if (inctx->mode == AP_MODE_SPECULATIVE) {
                 /* We want to rollback this read. */
                 char_buffer_write(inctx, buf, rc);
@@ -754,28 +754,17 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx,
             if (rc == 0) {
                 /* If EAGAIN, we will loop given a blocking read,
                  * otherwise consider ourselves at EOF.
+                 * On win32 in particular, but perhaps on other kernels,
+                 * a blocking call isn't 'always' blocking.
                  */
                 if (APR_STATUS_IS_EAGAIN(inctx->rc)
                         || APR_STATUS_IS_EINTR(inctx->rc)) {
-                    /* Already read something, return APR_SUCCESS instead.
-                     * On win32 in particular, but perhaps on other kernels,
-                     * a blocking call isn't 'always' blocking.
-                     */
-                    if (*len > 0) {
-                        inctx->rc = APR_SUCCESS;
-                        break;
-                    }
                     if (inctx->block == APR_NONBLOCK_READ) {
                         break;
                     }
                 }
-                else {
-                    if (*len > 0) {
-                        inctx->rc = APR_SUCCESS;
-                        break;
-                    }
-                }
             }
+
             ssl_err = SSL_get_error(inctx->filter_ctx->pssl, rc);
             c = (conn_rec*)SSL_get_app_data(inctx->filter_ctx->pssl);
 
@@ -790,10 +779,6 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx,
                  */
                 inctx->rc = APR_EAGAIN;
 
-                if (*len > 0) {
-                    inctx->rc = APR_SUCCESS;
-                    break;
-                }
                 if (inctx->block == APR_NONBLOCK_READ) {
                     break;
                 }
@@ -802,11 +787,6 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx,
             else if (ssl_err == SSL_ERROR_SYSCALL) {
                 if (APR_STATUS_IS_EAGAIN(inctx->rc)
                         || APR_STATUS_IS_EINTR(inctx->rc)) {
-                    /* Already read something, return APR_SUCCESS instead. */
-                    if (*len > 0) {
-                        inctx->rc = APR_SUCCESS;
-                        break;
-                    }
                     if (inctx->block == APR_NONBLOCK_READ) {
                         break;
                     }