com php-src: Fixed bug #53965 <xsl:include> cannot find files w/ relative paths when loaded w/ "file://": ext/dom/document.c
| From: | Anatol Belski | Date: | Tue, 01 Apr 2014 08:07:18 +0000 |
| Subject: | com php-src: Fixed bug #53965 <xsl:include> cannot find files w/ relative paths when loaded w/ "file://": ext/dom/document.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-76665@lists.php.net to get a copy of this message | ||
Commit: 3cb056f523d470a677a1c7fc186ce2720fece535
Author: Anatol Belski <ab@php.net> Tue, 1 Apr 2014 10:07:18 +0200
Parents: fca331cae9c229dd52d762222532ba621039030e
Branches: PHP-5.4 PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3cb056f523d470a677a1c7fc186ce2720fece535
Log:
Fixed bug #53965 <xsl:include> cannot find files w/ relative paths when loaded w/
"file://"
Bugs:
https://bugs.php.net/53965
Changed paths:
M ext/dom/document.c
Diff:
diff --git a/ext/dom/document.c b/ext/dom/document..c
index 19acff7..f105f6d 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -1509,6 +1509,12 @@ char *_dom_get_valid_file_path(char *source, char *resolved_path, int
resolved_p
if (uri->scheme != NULL) {
/* absolute file uris - libxml only supports localhost or empty host */
+#ifdef PHP_WIN32
+ if (strncasecmp(source, "file://",7) == 0 && ':' == source[8]) {
+ isFileUri = 1;
+ source += 7;
+ } else
+#endif
if (strncasecmp(source, "file:///",8) == 0) {
isFileUri = 1;
#ifdef PHP_WIN32