Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 87153 invoked from network); 24 Jan 2004 13:36:29 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 24 Jan 2004 13:36:29 -0000 Received: (qmail 76100 invoked by uid 500); 24 Jan 2004 13:36:20 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 76068 invoked by uid 500); 24 Jan 2004 13:36:20 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Delivered-To: moderator for dev@httpd.apache.org Received: (qmail 85941 invoked from network); 24 Jan 2004 02:28:23 -0000 X-Originating-IP: [202.59.254.2] X-Originating-Email: [miss_nok13@hotmail.com] X-Sender: miss_nok13@hotmail.com From: "PENPRAPA MUNKID" To: dev@httpd.apache.org Bcc: Subject: RE: cvs commit: httpd-2.0/modules/ssl ssl_engine_io.c Date: Sat, 24 Jan 2004 09:28:31 +0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 24 Jan 2004 02:28:31.0863 (UTC) FILETIME=[C254A070:01C3E221] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N more info www.naraicoms.com >From: jorton@apache.org >Reply-To: dev@httpd.apache.org >To: httpd-2.0-cvs@apache.org >Subject: cvs commit: httpd-2.0/modules/ssl ssl_engine_io.c >Date: 23 Jan 2004 16:50:24 -0000 > >jorton 2004/01/23 08:50:24 > > Modified: . CHANGES > modules/ssl ssl_engine_io.c > Log: > * modules/ssl/ssl_engine_io.c (ssl_io_filter_output): Use non-blocking > bucket reads whilst data remains available; flush when a read returns > EAGAIN. Fixes streaming nph- CGI scripts over SSL. > > PR: 21944 > Inspired by: Jeff Trawick > > Revision Changes Path > 1.1373 +3 -0 httpd-2.0/CHANGES > > Index: CHANGES > =================================================================== > RCS file: /home/cvs/httpd-2.0/CHANGES,v > retrieving revision 1.1372 > retrieving revision 1.1373 > diff -b -d -u -r1.1372 -r1.1373 > --- CHANGES 23 Jan 2004 00:08:16 -0000 1.1372 > +++ CHANGES 23 Jan 2004 16:50:23 -0000 1.1373 > @@ -2,6 +2,9 @@ > > [Remove entries to the current 2.0 section below, when backported] > > + *) mod_ssl: Fix streaming output from an nph- CGI script. PR 21944 > + [Joe Orton] > + > *) mod_log_config: Fix corruption of buffered logs with threaded > MPMs. PR 25520. [Jeff Trawick] > > > > > 1.114 +17 -3 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.113 > retrieving revision 1.114 > diff -b -d -u -r1.113 -r1.114 > --- ssl_engine_io.c 1 Jan 2004 13:26:21 -0000 1.113 > +++ ssl_engine_io.c 23 Jan 2004 16:50:24 -0000 1.114 > @@ -1370,6 +1370,8 @@ > apr_status_t status = APR_SUCCESS; > ssl_filter_ctx_t *filter_ctx = f->ctx; > bio_filter_in_ctx_t *inctx; > + bio_filter_out_ctx_t *outctx; > + apr_read_type_e rblock = APR_NONBLOCK_READ; > > if (f->c->aborted) { > apr_brigade_cleanup(bb); > @@ -1382,6 +1384,8 @@ > } > > inctx = (bio_filter_in_ctx_t *)filter_ctx->pbioRead->ptr; > + outctx = (bio_filter_out_ctx_t *)filter_ctx->pbioWrite->ptr; > + > /* When we are the writer, we must initialize the inctx > * mode so that we block for any required ssl input, because > * output filtering is always nonblocking. > @@ -1401,8 +1405,6 @@ > */ > if (APR_BUCKET_IS_EOS(bucket) || APR_BUCKET_IS_FLUSH(bucket)) { > if (bio_filter_out_flush(filter_ctx->pbioWrite) < 0) { > - bio_filter_out_ctx_t *outctx = > - (bio_filter_out_ctx_t >*)(filter_ctx->pbioWrite->ptr); > status = outctx->rc; > break; > } > @@ -1432,7 +1434,19 @@ > const char *data; > apr_size_t len; > > - status = apr_bucket_read(bucket, &data, &len, >APR_BLOCK_READ); > + status = apr_bucket_read(bucket, &data, &len, rblock); > + > + if (APR_STATUS_IS_EAGAIN(status)) { > + /* No data available: flush... */ > + if (bio_filter_out_flush(filter_ctx->pbioWrite) < 0) { > + status = outctx->rc; > + break; > + } > + rblock = APR_BLOCK_READ; > + continue; /* and try again with a blocking read. */ > + } > + > + rblock = APR_NONBLOCK_READ; > > if (!APR_STATUS_IS_EOF(status) && (status != APR_SUCCESS)) >{ > break; > > > _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963