diff options
author | Ralf Lang <lang@b1-systems.de> | 2013-06-28 08:32:10 +0200 |
---|---|---|
committer | Michael Wallner <mike@php.net> | 2013-08-06 22:51:57 +0200 |
commit | 84f9213e00ae624e789ec0ed8f023c22a557d215 (patch) | |
tree | 31506b97edd76830435996241eaaf84425c925c4 /main/SAPI.h | |
parent | 14caf174ff219376e4f1234bd297ffe973cc416e (diff) | |
download | php-git-84f9213e00ae624e789ec0ed8f023c22a557d215.tar.gz |
Patch for https://bugs.php.net/bug.php?id=44522 to allow uploading files
above 2G.
This is essentially the same as the patch
"uploads_larger_than_2g_HEAD_v2 (last revision 2012-03-26 03:59 UTC) by
jason at infininull dot com)" but using off_t instead of signed long
(originally: uint)
I tested this on 64bit linux and succeeded uploading a file of 4.8 G.
The File did not get corrupted or truncated in any way.
I did not yet test this under windows or 32 bit linux
Note that there are still limitations:
* Did not test for files > 8 G
* php does not yet reject absurdly high values
* Still limited by underlying file system specific limits and free space
* in upload
* tmp dir and destination dir
Diffstat (limited to 'main/SAPI.h')
-rw-r--r-- | main/SAPI.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/SAPI.h b/main/SAPI.h index 92b7329dbc..c3cacb515c 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -82,7 +82,7 @@ typedef struct { char *post_data, *raw_post_data; char *cookie_data; long content_length; - uint post_data_length, raw_post_data_length; + off_t post_data_length, raw_post_data_length; char *path_translated; char *request_uri; @@ -119,7 +119,7 @@ typedef struct _sapi_globals_struct { void *server_context; sapi_request_info request_info; sapi_headers_struct sapi_headers; - int read_post_bytes; + off_t read_post_bytes; unsigned char headers_sent; struct stat global_stat; char *default_mimetype; |