Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A68A818F85 for ; Fri, 20 Nov 2015 18:53:58 +0000 (UTC) Received: (qmail 29791 invoked by uid 500); 20 Nov 2015 18:53:58 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 29728 invoked by uid 500); 20 Nov 2015 18:53:58 -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: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 29715 invoked by uid 99); 20 Nov 2015 18:53:58 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Nov 2015 18:53:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id BAA81180A62 for ; Fri, 20 Nov 2015 18:53:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.653 X-Spam-Level: X-Spam-Status: No, score=0.653 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=comcast.net Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id snIR2yofkJdz for ; Fri, 20 Nov 2015 18:53:49 +0000 (UTC) Received: from resqmta-po-11v.sys.comcast.net (resqmta-po-11v.sys.comcast.net [96.114.154.170]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 5AC6D2059C for ; Fri, 20 Nov 2015 18:53:48 +0000 (UTC) Received: from resomta-po-20v.sys.comcast.net ([96.114.154.244]) by resqmta-po-11v.sys.comcast.net with comcast id jutf1r0045Geu2801utgmL; Fri, 20 Nov 2015 18:53:40 +0000 Received: from [192.168.199.10] ([69.251.84.114]) by resomta-po-20v.sys.comcast.net with comcast id jutf1r00Q2U0RYt01utgLK; Fri, 20 Nov 2015 18:53:40 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: strncasecmp From: Jim Jagielski In-Reply-To: Date: Fri, 20 Nov 2015 13:53:39 -0500 Content-Transfer-Encoding: 7bit Message-Id: <301856DC-1727-4158-96B0-8233D2E01CA9@jaguNET.com> References: To: dev@httpd.apache.org X-Mailer: Apple Mail (2.2104) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1448045620; bh=UH4yvhpu1bpNEpzhMKTvHApEzXreBYiXbZvYtTY2A28=; h=Received:Received:Content-Type:Mime-Version:Subject:From:Date: Message-Id:To; b=wsiZPl4n8MPAjx2Q4NokK2UQbMw285gfprHmnj6tAx3C68gMYjQ9xKXnRHnowvWHg ack+rOOO5sUsM4SU2HZFr8aMX9DM7ZUG9z4tRcF/NU1bjLLMMwc6gVyyJWVJkn6Akk vn7fmYr4x1qs7lnn5pCkk2lu54MIrTEVxQ/fs7kvEyfzFYjNuUaK2DVQIbbgmSL4Uf oPozRBCH9l0Lqx4RVWoeNWrqPVppnol7v/X3/FmynZlj0YHpfzi5mVv07/CZLm4f3A gmJgvEh5a+daOtmDOX3HY37lQjN+h6hT6aJZa+hz2JSDYz18SIIMjmlEFVqFBnEhQH /CnNZzxc80K6g== Implemented in r1715401 If people want to nit-pick about naming and wish to rename it to something else, be my guest. > On Nov 20, 2015, at 1:03 PM, Yann Ylavic wrote: > > +1 > > On Fri, Nov 20, 2015 at 6:17 PM, Jim Jagielski wrote: >> We use str[n]casecmp quite a bit. The rub is that some >> platforms use a sensible implementation (such as OSX) which >> uses a upper-lowercase map and is v. fast, and others >> use a brain-dead version which does an actual tolower() of >> each char in the string as it tests. We actually try to >> handle this in many cases by doing a switch/case test on the >> 1st char to fast path the strncasecmp, resulting in ugly code. >> >> This is crazy. >> >> I propose a ap_strncasecmp/ap_strcasecmp which we should use. >> Ideally, it would be in apr but no need to wait for that >> to happen :) >> >> Unless people have heartburn about this, I will add next week.