Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:1599 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38518 invoked from network); 16 May 2003 18:24:33 -0000 Received: from unknown (HELO mailout09.sul.t-online.com) (194.25.134.84) by pb1.pair.com with SMTP; 16 May 2003 18:24:33 -0000 Received: from fwd05.sul.t-online.de by mailout09.sul.t-online.com with smtp id 19GjsZ-0006Yq-04; Fri, 16 May 2003 20:24:27 +0200 Received: from vega.thetaphi.de (320003461825-0001@[217.81.210.86]) by fmrl05.sul.t-online.com with esmtp id 19GjsP-0GJevgC; Fri, 16 May 2003 20:24:17 +0200 Message-ID: <5.2.0.9.0.20030516201801.028ca9e0@pop3.web.de> X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Fri, 16 May 2003 20:24:14 +0200 To: jay@php.net Cc: internals@lists.php.net In-Reply-To: <20030516175749.99753.qmail@pb1.pair.com> References: <5.2.0.9.0.20030516182813.0292e370@pop3.web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Sender: 320003461825-0001@t-dialin.net Subject: Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4(PHP_4_3) / NEWS From: uwe@thetaphi.de (Uwe Schindler) I think the most important thing is to match for the WHOLE String, so the pattern must contain ^....$. This is fixed in PHP5 but jay did not want to put it into 4.3.2 But adding you code looks pretty good. Longer strings that match are more accurate. And by the way: using the browscap.c from the PHP5 tree at this time does not lead to the segmentation fault in bug #23657. Compiling with the PHP 4.3.2RC3 also segfaults on NSAPI. Uwe At 13:57 16.05.2003 -0400, you wrote: >Since you're still doing some browscap stuff, feel like testing a patch? I >noticed today that some of the browsers reported by get_browser() are still >pretty inaccurate. (Mozilla for instance is especially bad -- I'm getting >it reported as "Netscape 5", despite the fact that it's clearly Mozilla >1.2.1.) > >This patch (against HEAD) makes the browser_reg_compare() function a bit >more thourough in it's search for a browser. It doesn't bail out on the >first match it finds, for instance, as there are usually better matches >further down in the browscap.ini file. > >I've run it against as many user agent strings as I could find, and it's >reporting things much better now. (Recognizing Mozilla, properly reporting >Win98 instead of WinME in certain cases, finding the .NET CLR, finally >reporting SunOS instead of linux, etc.) > >It's slightly slower because of an extra hash lookup, but I think the slight >slow down is worth the extra precision. I can incorporate any further fixes >you have, if you'd like. > >J > > >Uwe Schindler wrote: > > > I told that a few days before... You should replace in browscap.ini the > > fopen by a zend_file_handle with type FD or FILENAME. I changed that and > > have a replacement for browscap.ini but I cannot submit it due to > > insufficient karma. > > > > In the patch is also fixed one bug in the regular expression generated. > > > > But Sasha should change the code, too. > > > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php ----- Uwe Schindler Addr 1: Bamberger Str. 24a, D-96049 Bamberg Addr 2: Drausnickstr. 153, D-91052 Erlangen http://www.thetaphi.de - http:///www.schindlers-software.de eMails: uwe@thetaphi.de (private); info@schindlers-software.de (company) Tel./Fax: +49 700 PCLATEIN (+49 700 72528346) Schindlers Software - Home of Schindlers PC-LATEIN 3.10 DIE Software zum Lateinlernen!