From dev-return-22595-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Tue Nov 24 16:27:10 2009 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 99874 invoked from network); 24 Nov 2009 16:27:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Nov 2009 16:27:10 -0000 Received: (qmail 83290 invoked by uid 500); 24 Nov 2009 16:27:10 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 83193 invoked by uid 500); 24 Nov 2009 16:27:09 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Delivered-To: moderator for dev@apr.apache.org Received: (qmail 61956 invoked by uid 99); 24 Nov 2009 06:42:20 -0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dongliqian@gmail.com designates 209.85.217.224 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=SCKGsLkCcuCuZ5o2qH6kB03950EIm5KES1CwPQiCrkQ=; b=viFQW70ie4QsTLGKSROVTjWabTbEZy2N5UntFzMdiuoDELstRWZ3f7R9fv4Kn9vwvU PQLF+SNSAXk1DumI8XbzeDYOwJfV8VG6dhMX1ika3VOOPPO5tHQ4yYGPeXtxpyNkbtLI jkUEdOIwSr1SXYS1sG91e1elWpKJQX0eDRrT8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=jE8BbopjDHgxYf/yySxscq4aOY9nMuWlY/uEVPdtCjJ0W7HIegvjr5thO34EZXK6PL nnLiAvrAXIMb5+m7SYg2yNjKoxZAi7KJV3MUF/VjSyD+cFPJOzPl+fXJkPjyuP4X2RcT rtGsTDWyPa8Yc791dr9WMB1tF8HeSa4N4uAx8= MIME-Version: 1.0 Date: Tue, 24 Nov 2009 14:41:51 +0800 Message-ID: Subject: Found a problem in APR From: =?GB2312?B?tq3Boses?= To: dev@apr.apache.org Cc: dongliqian@gmail.com Content-Type: multipart/mixed; boundary=0016e68deb35aeac870479183c53 X-Virus-Checked: Checked by ClamAV on apache.org --0016e68deb35aeac870479183c53 Content-Type: multipart/alternative; boundary=0016e68deb35aeac790479183c51 --0016e68deb35aeac790479183c51 Content-Type: text/plain; charset=ISO-8859-1 Hi, all, One problem was found at most releases of APR. Problem description: When using APR-1.3.5 on PPC, Apache HTTP server couldn't response HEAD message. Root Cause: After investigation, I found that there is a bug in APR when accepting a new conneciton. In function apr_socket_accept of file apr-1.3.5/network_io/sockets.c, if the new socket finds its father socket is non-blocking, it calls *apr_set_option* to change its own non-blocking mode. However, the function *apr_set_option* only changes the value in struct apr_socket_t, and the real non-blocking mode of the socket has not been modified. So I think we'd better call function *apr_socket_opt_set* to set the real non-blocking mode of the new socket. Please see attached for the patched file. Thanks, Tony --0016e68deb35aeac790479183c51 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, all,

One problem was found at most releases of APR.
Problem description:
When us= ing APR-1.3.5 on PPC, Apache HTTP server couldn't response HEAD message= .

Root Cause:
After investigation, I found that there is a bug in APR = when accepting a new
conneciton.
In function apr_socket_accept of fi= le apr-1.3.5/network_io/sockets.c, if the
new socket finds its father so= cket is non-blocking, it calls
apr_set_option to change its own no= n-blocking mode. However, the function
apr_set_option only changes the value in struct apr_socket_t, and th= e real
non-blocking mode of the socket has not been modified. So I think we'd = better
call function apr_socket_opt_= set to set the real non-blocking mode of the new
socket.

Plea= se see attached for the patched file.

Thanks,
Tony
--0016e68deb35aeac790479183c51-- --0016e68deb35aeac870479183c53 Content-Type: application/octet-stream; name="sockets.diff" Content-Disposition: attachment; filename="sockets.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g2eapeal0 LS0tIGFwci0xLjMuNS9uZXR3b3JrX2lvL3VuaXgvc29ja2V0cy5jLm9yaWcJRnJpIE5vdiAyMCAw NToxNjoxOSAyMDA5CisrKyBhcHItMS4zLjUvbmV0d29ya19pby91bml4L3NvY2tldHMuYwlGcmkg Tm92IDIwIDA1OjEzOjUwIDIwMDkKQEAgLTIzMywxMiArMjMzLDEyIEBACiAKICNpZiBBUFJfVENQ X05PREVMQVlfSU5IRVJJVEVECiAgICAgaWYgKGFwcl9pc19vcHRpb25fc2V0KHNvY2ssIEFQUl9U Q1BfTk9ERUxBWSkgPT0gMSkgewotICAgICAgICBhcHJfc2V0X29wdGlvbigqbmV3LCBBUFJfVENQ X05PREVMQVksIDEpOworICAgICAgICBhcHJfc29ja2V0X29wdF9zZXQoKm5ldywgQVBSX1RDUF9O T0RFTEFZLCAxKTsKICAgICB9CiAjZW5kaWYgLyogVENQX05PREVMQVlfSU5IRVJJVEVEICovCiAj aWYgQVBSX09fTk9OQkxPQ0tfSU5IRVJJVEVECiAgICAgaWYgKGFwcl9pc19vcHRpb25fc2V0KHNv Y2ssIEFQUl9TT19OT05CTE9DSykgPT0gMSkgewotICAgICAgICBhcHJfc2V0X29wdGlvbigqbmV3 LCBBUFJfU09fTk9OQkxPQ0ssIDEpOworICAgICAgICBhcHJfc29ja2V0X29wdF9zZXQoKm5ldywg QVBSX1NPX05PTkJMT0NLLCAxKTsKICAgICB9CiAjZW5kaWYgLyogQVBSX09fTk9OQkxPQ0tfSU5I RVJJVEVEICovCiAK --0016e68deb35aeac870479183c53--