Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DD46D182E5 for ; Fri, 25 Sep 2015 07:27:07 +0000 (UTC) Received: (qmail 28419 invoked by uid 500); 25 Sep 2015 07:27:07 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 28356 invoked by uid 500); 25 Sep 2015 07:27:07 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 28347 invoked by uid 99); 25 Sep 2015 07:27:07 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Sep 2015 07:27:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 56E10C0FA4 for ; Fri, 25 Sep 2015 07:27:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.994 X-Spam-Level: X-Spam-Status: No, score=0.994 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.006] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id SH2q72KUlrS0 for ; Fri, 25 Sep 2015 07:27:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTP id AE99123252 for ; Fri, 25 Sep 2015 07:27:06 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 60A77E071D for ; Fri, 25 Sep 2015 07:27:06 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 5C2D83A0233 for ; Fri, 25 Sep 2015 07:27:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1705236 - /httpd/httpd/trunk/modules/ssl/ssl_engine_io.c Date: Fri, 25 Sep 2015 07:27:06 -0000 To: cvs@httpd.apache.org From: ylavic@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150925072706.5C2D83A0233@svn01-us-west.apache.org> Author: ylavic Date: Fri Sep 25 07:27:04 2015 New Revision: 1705236 URL: http://svn.apache.org/viewvc?rev=1705236&view=rev Log: mod_ssl: don't FLUSH first for non blocking reads. Such readers are prepared to received empty data anyway (and take appropriate action), while e.g. check_pipeline() is not expecting the pipe to be flushed under it. Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_io.c Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_io.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_io.c?rev=1705236&r1=1705235&r2=1705236&view=diff ============================================================================== --- httpd/httpd/trunk/modules/ssl/ssl_engine_io.c (original) +++ httpd/httpd/trunk/modules/ssl/ssl_engine_io.c Fri Sep 25 07:27:04 2015 @@ -472,9 +472,12 @@ static int bio_filter_in_read(BIO *bio, * connection or for a proxy connection. Calling _out_flush * should be very cheap in cases where it is unnecessary (and no * output is buffered) so the performance impact of doing it - * unconditionally should be minimal. + * unconditionally should be minimal, but in non blocking mode + * where the caller may not expect the flush round trip (e.g. + * check_pipeline()'s speculative and non-blocking read). */ - if (bio_filter_out_flush(inctx->bio_out) < 0) { + if (block != APR_NONBLOCK_READ && + bio_filter_out_flush(inctx->bio_out) < 0) { bio_filter_out_ctx_t *outctx = inctx->bio_out->ptr; inctx->rc = outctx->rc; return -1;