cvs: php-src(PHP_4_3) /ext/standard http_fopen_wrapper.c
| From: | Stefan Esser | Date: | Fri, 28 May 2004 13:38:19 +0000 |
| Subject: | cvs: php-src(PHP_4_3) /ext/standard http_fopen_wrapper.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-27491@lists.php.net to get a copy of this message | ||
sesser Fri May 28 09:38:19 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src/ext/standard http_fopen_wrapper.c
Log:
MFH
http://cvs.php.net/diff.php/php-src/ext/standard/http_fopen_wrapper.c?r1=1.53.2.18&r2=1.53.2.19&ty=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.53.2.18
php-src/ext/standard/http_fopen_wrapper.c:1.53.2.19
--- php-src/ext/standard/http_fopen_wrapper.c:1.53.2.18 Wed Feb 25 19:13:02 2004
+++ php-src/ext/standard/http_fopen_wrapper.c Fri May 28 09:38:19 2004
@@ -18,7 +18,7 @@
| Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: http_fopen_wrapper.c,v 1.53.2.18 2004/02/26 00:13:02 sniper Exp $ */
+/* $Id: http_fopen_wrapper.c,v 1.53.2.19 2004/05/28 13:38:19 sesser Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -467,7 +467,12 @@
char *s = strrchr(resource->path, '/');
if (!s) {
s = resource->path;
- *s = '/';
+ if (!s[0]) {
+ efree(s);
+ s = resource->path = estrdup("/");
+ } else {
+ *s = '/';
+ }
}
s[1] = '\0';
if (resource->path && *(resource->path) == '/' &&
*(resource->path + 1) == '\0') {