Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96238 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98228 invoked from network); 4 Oct 2016 18:14:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Oct 2016 18:14:36 -0000 Authentication-Results: pb1.pair.com header.from=dave@mudsite.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dave@mudsite.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain mudsite.com designates 209.85.215.51 as permitted sender) X-PHP-List-Original-Sender: dave@mudsite.com X-Host-Fingerprint: 209.85.215.51 mail-lf0-f51.google.com Received: from [209.85.215.51] ([209.85.215.51:34161] helo=mail-lf0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/FA-06241-981F3F75 for ; Tue, 04 Oct 2016 14:14:35 -0400 Received: by mail-lf0-f51.google.com with SMTP id b81so72736383lfe.1 for ; Tue, 04 Oct 2016 11:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mudsite-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=rCamLfCmj79h9acGi5q8rP2YgTZsgea/vWfuQ9oKKvc=; b=DjS5POHbFgmGQwlunseTUWyobk10Znxt3PUMp38kbUVNjhjqbWGPnhTrTUGdFF8ZiZ oYnVBskjLuDsD9CF8QtQjBynEASeRsyF9Mugo3IFuxUHaLrLQIkC5lqkZjPKRU2Dm4Rz TA7l0NqErhl3lNIqFwLjezJGM0p3mOLFMUJ8944KheMjBNMv++ivA4d1l5oTu+XJ/Xgs oM/IWHQaaVbs/ZcoeUnsd0NVezDEiXQWlVtpSi+VLhTBvbcs4WJ/NEjVvYAnaq+BFm80 6EDdQ/C+gMqvM4+uCSo1BrFlEJ4A9Rqu9FM4fVI6l+fIWSkOYkt8fJoVVr2MG/fy5X9s WmSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=rCamLfCmj79h9acGi5q8rP2YgTZsgea/vWfuQ9oKKvc=; b=NEKYTH6FAR1c6+JlKZo6m51K9E2Lmkj0yOUrJybj9YyHpgSwjNgck/QLZMGn/NKxEW kRk0Yk7HfOwGwLpAib0Nli2PWtuH2vdzNDijhIZAwpZalN7KQQmzPlDK3Snp3CU4ILUM 96qzlvDVIZ98EPSSh+DAVwHj/ivdxLAb0pfbHeOHzzSfKs5vAvLWhXxZZZ7TmYgYzfe/ 2JFho/dnNtnA8J887BzoNO3kB1cTWHvNWOTkS1jrPluaiN1cOs4L6klmZHuQKphqGh5l FR6F4QHswIKX+F3lb7mHUwxtcKG0q0ZKnfWBFQsJ2yW9O17QPuwkqiU0T01MoXnIaq2g p08g== X-Gm-Message-State: AA6/9RkF6MnB5XnSEc6zXkEnmsNaCU0KHYnvHmjn2JG1qoRCpX7oTSASZgDN8vx6OQUTRmd/xUjM8R40U+lBqQ== X-Received: by 10.25.32.134 with SMTP id g128mr2250118lfg.87.1475604870826; Tue, 04 Oct 2016 11:14:30 -0700 (PDT) MIME-Version: 1.0 Date: Tue, 04 Oct 2016 18:14:19 +0000 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary=001a114034ae279fbf053e0e0849 Subject: [RFC] Bug #72811 - Replacing parse_url() From: dave@mudsite.com (David Walker) --001a114034ae279fbf053e0e0849 Content-Type: text/plain; charset=UTF-8 Hi all, A couple weeks back I took a look at 72811[1]. The bug being that parse_url() didn't accept IPv6 addresses without a scheme, like it did for IPv4 addresses. I attempted to patch the specific bug within the scope of how parse_url() was processing URI's. After opening a PR for the resoution, Yasuo and Christoph both chimed in that perhaps replacing the implementation with an re2c based parser would be better. We found a parser[2] that did almost everything necessary. I took it and made it more strictly adhere to RFC3986[3]. I have updated my original PR[4] and created a RFC[5] that aims to replace the parsing of parse_url() to be more strict to RFC3986. This will provide a BC break, as explained in the RFC that at very least warrants some discussion. We had kicked around the idea on the PR of deprecating parse_url, and creating a new function with the more-compliant parser, but oped against it. I'm looking for discussion on if a total replacement is the preferred way to go about this, and if, we should be making parse_url() more standards strict. Since it today has many breaks with RFC3986 that provide semi-reasonable parsing patterns. -- Dave [1] - https://bugs.php.net/bug.php?id=72811 [2] - https://github.com/staskobzar/url_parser_re2c [3] - https://tools.ietf.org/html/rfc3986 [4] - https://github.com/php/php-src/pull/2079 [5] - https://wiki.php.net/rfc/replace_parse_url --001a114034ae279fbf053e0e0849--