pajoye Mon May 25 16:09:27 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/xmlwriter php_xmlwriter.c Log: - better fix for file:/// and file://localhost (thx Ilia), init file_dest when the path is an uri http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/php_xmlwriter.c?r1=1.20.2.12.2.15.2.13&r2=1.20.2.12.2.15.2.14&diff_format=u Index: php-src/ext/xmlwriter/php_xmlwriter.c diff -u php-src/ext/xmlwriter/php_xmlwriter.c:1.20.2.12.2.15.2.13 php-src/ext/xmlwriter/php_xmlwriter.c:1.20.2.12.2.15.2.14 --- php-src/ext/xmlwriter/php_xmlwriter.c:1.20.2.12.2.15.2.13 Mon May 25 15:35:03 2009 +++ php-src/ext/xmlwriter/php_xmlwriter.c Mon May 25 16:09:27 2009 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xmlwriter.c,v 1.20.2.12.2.15.2.13 2009/05/25 15:35:03 pajoye Exp $ */ +/* $Id: php_xmlwriter.c,v 1.20.2.12.2.15.2.14 2009/05/25 16:09:27 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -615,7 +615,7 @@ if (uri->scheme != NULL) { /* absolute file uris - libxml only supports localhost or empty host */ if (strncasecmp(source, "file:///", 8) == 0) { - if (strlen(source) == 8) { + if (source[sizeof("file:///") - 1] == '\0') { return NULL; } isFileUri = 1; @@ -625,7 +625,7 @@ source += 7; #endif } else if (strncasecmp(source, "file://localhost/",17) == 0) { - if (strlen(source) == 17) { + if (source[sizeof("file://localhost/") - 1] == '\0') { return NULL; } @@ -659,6 +659,8 @@ } file_dest = resolved_path; + } else { + file_dest = source; } xmlFreeURI(uri);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php