summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/http_fopen_wrapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
index 86e0f5a197..fe74f8c6f1 100644
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -120,7 +120,7 @@ FILE *php_fopen_url_wrap_http(char *path, char *mode, int options, int *issock,
strcpy(hdr_line, "GET ");
/* tell remote http which file to get */
- if (resource->path != NULL) {
+ if (resource->path != NULL && strlen(resource->path)) {
strlcat(hdr_line, resource->path, sizeof(hdr_line));
} else {
strlcat(hdr_line, "/", sizeof(hdr_line));