Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 26902 invoked from network); 31 Aug 2007 10:52:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Aug 2007 10:52:12 -0000 Received: (qmail 11407 invoked by uid 500); 31 Aug 2007 10:52:06 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 11360 invoked by uid 500); 31 Aug 2007 10:52:06 -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 65005 invoked by uid 99); 31 Aug 2007 10:09:19 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of steven.nairn@googlemail.com designates 209.85.198.189 as permitted sender) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=TpUSc4PjHHiNvhXZaui/4ejMnITW7qVYZqS4Waf60XYzytrVkzVE080IiBTS1Gm/GyeMHdbENtxeJ4PZ6DBabYHJaYX594mD2UOSYhxGH1YHRXwCE0snvu2BKZTCWvXO+uVLsW+5txYXd0a5ezNQZR30RMWC28JPwImZSKH3ZXM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=B6zaSLOfF6KE9yQuZwDXnt3LcBvdgz6/2m89kfehXqzm7biB0hI0zNB+hMGdSXGkEdfYMisDfNWPYxOpnZ5z1ZqCMqmnz8rHDE/RpQQWR/DawnARb+PpOelCRPwQyNRlH6Z776xRuAHkGibLGDX0crceC8pdZl7SOWADO64gm2w= Message-ID: Date: Fri, 31 Aug 2007 11:08:50 +0100 From: "Steven Nairn" To: dev@apr.apache.org Subject: Re: Am I hitting the list? MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1570_29200990.1188554930117" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_1570_29200990.1188554930117 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Mladen Turk wrote: > OK. The mail doesn't hit the httpd dev list as well. > Looks like I really found something that no one wishes to hear :) > > However here is the link to the body that ASF is rejecting: > > http://jbecome.net/dload/aprtest.txt The "testfile" failure on win32 is in test_gets_buffered() because read_with_timeout() (in file_io/win32/readwrite.c) does not correctly report end of file when the file is opened with the APR_FOPEN_XTHREAD flag. On Windows the APR_FOPEN_XTHREAD flag means that the file is opened with FILE_FLAG_OVERLAPPED and is read by ReadFile() with an OVERLAPPED structure. In this case when end of file is reached ReadFile() returns false and GetLastError() returns ERROR_HANDLE_EOF (error 38, which APR reports as 720038). See MSDN docs on ReadFile: http://msdn2.microsoft.com/EN-US/library/aa365467.aspx Without the "overlapped" stuff when the end of file is reached ReadFile() returns true but sets the number of bytes read to zero. The fix is to check for ERROR_HANDLE_EOF in read_with_timeout() (attached patch). The test_gets_buffered() test in testfile.c is new in 1.2.9 so the problem probably existed in 1.2.8 but wasn't tested. Cheers, Steve. ------=_Part_1570_29200990.1188554930117 Content-Type: text/plain; name="patch.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="patch.txt"; filename="patch.txt" X-Attachment-Id: f_f60iu1g9 LS0tIGZpbGVfaW8vd2luMzIvcmVhZHdyaXRlLmMtb3JpZwlUaHUgQXVnICAzIDE3OjE2OjQxIDIw MDYKKysrIGZpbGVfaW8vd2luMzIvcmVhZHdyaXRlLmMJRnJpIEF1ZyAzMSAxMDo1NTowOCAyMDA3 CkBAIC0xMjIsNiArMTIyLDkgQEAKICAgICAgICAgaWYgKHJ2ID09IEFQUl9GUk9NX09TX0VSUk9S KEVSUk9SX0JST0tFTl9QSVBFKSkgewogICAgICAgICAgICAgLyogQXNzdW1lIEVSUk9SX0JST0tF Tl9QSVBFIHNpZ25hbHMgYW4gRU9GIHJlYWRpbmcgZnJvbSBhIHBpcGUgKi8KICAgICAgICAgICAg IHJ2ID0gQVBSX0VPRjsKKyAgICAgICAgfSBlbHNlIGlmIChydiA9PSBBUFJfRlJPTV9PU19FUlJP UihFUlJPUl9IQU5ETEVfRU9GKSkgeworICAgICAgICAgICAgLyogRGlkIHdlIGhpdCBFT0YgcmVh ZGluZyBmcm9tIHRoZSBoYW5kbGU/ICovCisgICAgICAgICAgICBydiA9IEFQUl9FT0Y7CiAgICAg ICAgIH0KICAgICB9CiAgICAgCg== ------=_Part_1570_29200990.1188554930117--