diff options
author | foobar <sniper@php.net> | 2001-06-19 16:54:30 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2001-06-19 16:54:30 +0000 |
commit | b0ed727aeedf8eb0f91a3f2845c18d825f65410f (patch) | |
tree | ca6a6d9592be0f62fe77191537ef3c73d4ae4d55 | |
parent | 1e0aaeffe9e48fdd9086dc248a620035ed8de1a8 (diff) | |
download | php-git-b0ed727aeedf8eb0f91a3f2845c18d825f65410f.tar.gz |
Fix one problem with Opera browsers. Tested with IE,NS,Opera.
There can be also a \t before the 'filename=' part.
-rw-r--r-- | main/rfc1867.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/main/rfc1867.c b/main/rfc1867.c index 899bfb66dd..d7a90fa792 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -220,9 +220,9 @@ static void php_mime_split(char *buf, int cnt, char *boundary, zval *array_ptr S php_error(E_WARNING, "File upload error - no name component in content disposition"); SAFE_RETURN; } - filename = strstr(s, " filename=\""); + filename = strstr(s, "filename=\""); if (filename && filename < loc) { - filename += 11; + filename += 10; s = memchr(filename, '\"', loc - filename); if (!s) { php_error(E_WARNING, "File Upload Mime headers garbled filename: [%c%c%c%c%c]", *filename, *(filename + 1), *(filename + 2), *(filename + 3), *(filename + 4)); @@ -251,11 +251,11 @@ static void php_mime_split(char *buf, int cnt, char *boundary, zval *array_ptr S } /* Add $foo[name] */ - if (is_arr_upload) { - sprintf(lbuf, "%s[name][%s]", abuf, arr_index); - } else { - sprintf(lbuf, "%s[name]", namebuf); - } + if (is_arr_upload) { + sprintf(lbuf, "%s[name][%s]", abuf, arr_index); + } else { + sprintf(lbuf, "%s[name]", namebuf); + } if (s && s > filenamebuf) { register_http_post_files_variable(lbuf, s+1, http_post_files, 0 ELS_CC PLS_CC); } else { |