Re: Scheme identification in stream wrappers

From: Date: Wed, 06 Apr 2005 15:02:30 +0000
Subject: Re: Scheme identification in stream wrappers
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-15872@lists.php.net to get a copy of this message
You know, I could have sworn that I only looked for a : as the separator. Not according to php_stream_locate_url_wrapper():
for (p = path; isalnum((int)*p) || *p == '+' || *p == '-' || *p == '.'; p++) n++; if ((*p == ':') && (n > 1) && !strncmp("://", p, 3)) {
       protocol = path;
} else if (strncasecmp(path, "zlib:", 5) == 0) {
       ...
} Which of course says: "It it ain't [a-zA-Z0-9+.-]+://, and it ain't zlib:, then it ain't a wrapper."
I seem to remember a discussion about this in the past, but don't recall the details. The only thing that positively leaps to mind is the ability to read-from/write-to alternate data streams under win32. But I suppose that could be worked around easily enough. If nothing else an explicit file:// scheme when that's needed would remedy the problem. Remind me what the *nixes do with ':' ?
-Sara

« previous php.internals (#15872) next »