diff options
| author | Pierre Joye <pajoye@php.net> | 2010-05-03 17:47:58 +0000 |
|---|---|---|
| committer | Pierre Joye <pajoye@php.net> | 2010-05-03 17:47:58 +0000 |
| commit | d90f8560aa87bd7f223c4b1ff1a8c1ecd1e9506d (patch) | |
| tree | b178ee34d64d16fc674c3ad99f9d40a0b150208e /sapi/apache2handler/sapi_apache2.c | |
| parent | 7de2607c1214769630fb16c426d931ad81eacb14 (diff) | |
| download | php-git-d90f8560aa87bd7f223c4b1ff1a8c1ecd1e9506d.tar.gz | |
- #51273, Content-length header is limited to 32bit integer with apache2/windows
Diffstat (limited to 'sapi/apache2handler/sapi_apache2.c')
| -rw-r--r-- | sapi/apache2handler/sapi_apache2.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index e3367eaba8..24e489d722 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -120,7 +120,15 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_header_op_e } ctx->content_type = estrdup(val); } else if (!strcasecmp(sapi_header->header, "content-length")) { - ap_set_content_length(ctx->r, strtol(val, (char **)NULL, 10)); +#ifdef PHP_WINDOWS +# ifdef APR_HAS_LARGE_FILES + ap_set_content_length(ctx->r, (apr_off_t) _strtoui64(val, (char **)NULL, 10)); +# else + ap_set_content_length(ctx->r, (apr_off_t) strtol(val, (char **)NULL, 10)); +# endif +#else + ap_set_content_length(ctx->r, (apr_off_t) strtol(val, (char **)NULL, 10)); +#endif } else if (op == SAPI_HEADER_REPLACE) { apr_table_set(ctx->r->headers_out, sapi_header->header, val); } else { |
