Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15856 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76976 invoked by uid 1010); 6 Apr 2005 12:41:39 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 76961 invoked from network); 6 Apr 2005 12:41:39 -0000 Received: from unknown (HELO gmail.com) (127.0.0.1) by localhost with SMTP; 6 Apr 2005 12:41:39 -0000 X-Host-Fingerprint: 64.233.184.206 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.206:12355] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id 72/70-19272-109D3524 for ; Wed, 06 Apr 2005 08:41:37 -0400 Received: by wproxy.gmail.com with SMTP id 57so151669wri for ; Wed, 06 Apr 2005 05:41:35 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=Qia2+vaWlvObUK9HMXP4jGQudFvC8j2ZMdBlbVJ5QC0S4tvoWu3ohtNUJENveVV1h4Poj+MFp9YbrJgE/Y4xi8Z0Q7JajJQHgNJ1+dS/5XSdRw65IfH/lGrhynM3FDYxsY/myYz5Fab4Wno361Vh182UU6EHV7BYBi2hO76fCKU= Received: by 10.54.32.67 with SMTP id f67mr408954wrf; Wed, 06 Apr 2005 05:41:35 -0700 (PDT) Received: by 10.54.77.4 with HTTP; Wed, 6 Apr 2005 05:41:35 -0700 (PDT) Message-ID: <4e89b4260504060541544ccde2@mail.gmail.com> Date: Wed, 6 Apr 2005 08:41:35 -0400 Reply-To: Wez Furlong To: "Morgan L. Owens" Cc: internals@lists.php.net In-Reply-To: <425369FD.1000800@nznet.gen.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: <425369FD.1000800@nznet.gen.nz> Subject: Re: [PHP-DEV] Scheme identification in stream wrappers From: kingwez@gmail.com (Wez Furlong) You know, I could have sworn that I only looked for a : as the separator. I seem to remember a discussion about this in the past, but don't recall the details. Would you mind searching the archives for the old php-dev mailing list to see if you can find anything else on this matter? --Wez. On Apr 6, 2005 12:47 AM, Morgan L. Owens wrote: > It was suggested I post this here. > > In PHP, the character sequence "://" separates the protocol name from > the protocol-specific part of a stream name. Clearly, the intention is > that these stream names are URLs (i.e., URIs that actually provide a > location for the identified resource). However, the URI specification > (RFC 3986) states that the scheme delimiter is merely ":", and that > "://" is only applicable for _some_ URI formats. There are URLs in > common use that do not use "://" (e.g., mailto:), and in fact support > for "zlib:" is a hardwired exception in the present code. > > May I propose that the parser which parses out the scheme from the rest > of the URL look only for the initial ":" in the stream name, rather than > "://". > > Existing uses of stream wrappers will continue to function, since the > name of the scheme won't actually change, and it's the wrapper author's > responsibility to parse the rest of the URL anyway; but it will become > possible to correctly write, e.g., "mailto:eric@example.com" instead of > "mailto://eric@example.com", or (to use the example used in the manual > to describe stream_wrapper_register()) "var:myvar" instead of "var://myvar". > > This would also make use of parse_url() more consistent as, for example, > parse_url('var:myvar') will put the name of myvar into the path element > of the returned array, instead of mistakenly putting it in the host element. > > MLO > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >