On Apr 9, 2005 6:07 AM, Morgan L. Owens <[EMAIL PROTECTED]> wrote:
>  > Really?
>  > Can you guarantee that your user-space code to sniff out the path is
>  > going to work 100% of the time on all platforms?
>  >
> Who said user-space? I meant in the implementation of fopen().

fopen() is implemented in user-space, meaning, not kernel-space.
Only the kernel knows what logic it will really really use to resolve
a valid path.
Emulating that code for each supported platform on which PHP runs is
plain stupid.
 
>  > The file:// protocol is a load of rubbish, because it neglects to
>  > specify how remote file access should work.
>  >
> It explicitly states as much.
> "The file URL scheme is unusual in that it does not specify an Internet
> protocol or access method for such files; as such, its utility in
> network protocols between hosts is limited."

s/limited/useless/
 
>  > Is there a clear win for PHP, that outweighs the strong risk of
>  > breaking PHP until all the edge cases have been resolved?
>  >
> Probably not. It would have been easier to fix it earlier on before
> kludging file paths and URLs together in the same namespace without
> thinking through the consequences, but that opportunity is long lost.

You might regard it as a kludge, but it's actually a corner-stone of
PHP development.

> I guess it will just have to be another case where we have to say "Screw
> the standards. They're too difficult to implement." Ah well, it's only a
> couple of characters.

I suggest that you go and re-read RFC 1738, section 3.1, Common
Internet Scheme Syntax.  We support that, because the original
wrappers implementation was solely for "URL schemes that involve the
direct use of an IP-based protocol to a specified host on the
Internet".

If you read on further, section 3.5 states "The mailto URL scheme is
used to designate the Internet mailing address of an individual or
service. No additional information other than an Internet mailing
address is present or implied."

In other words, there is no defined mapping to a streaming data
source, which is what the wrappers layer in PHP is built for.

> tel://+1-816-555-1212 it is, then. And explain to
> users _why_ some URLs need to be massaged (in user space) before PHP can
> recognise them. It's not a bug, it's a feature.

Do you think that by trying to insult PHP you'll motivate the
developers to try and change it to the way you think it should work?

The bottom line is that by searching for ://, we can completely
unambiguously detect Common Internet Scheme Syntax URLs, and do very
simply and very quickly, something that is important in high traffic
web applications.

--Wez.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to