]> granicus.if.org Git - php/commitdiff
- #51273, Content-length header is limited to 32bit integer with apache2/windows
authorPierre Joye <pajoye@php.net>
Mon, 3 May 2010 17:47:58 +0000 (17:47 +0000)
committerPierre Joye <pajoye@php.net>
Mon, 3 May 2010 17:47:58 +0000 (17:47 +0000)
NEWS
sapi/apache2handler/sapi_apache2.c

diff --git a/NEWS b/NEWS
index 7b9a08b6e4e9c00b10a281aeaaddac90e63e84cb..a7a7aeb879c6da44166d334811394819f47f1071 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,8 @@ PHP                                                                        NEWS
 - Fixed a possible arbitrary memory access inside sqlite extension. Reported
   by Mateusz Kocielski. (Ilia)  
 
+- Fixed bug #51723 (Content-length header is limited to 32bit integer with
+  Apache2 on Windows). (Pierre)
 - Fixed bug #51671 (imagefill does not work correctly for small images).
   (Pierre)
 - Fixed bug #51670 (getColumnMeta causes segfault when re-executing query
index 0829c2619e0edad650176bbf82637b622765ba81..59d691be30a350927e78e0068e4abff37873fe0e 100644 (file)
@@ -110,7 +110,15 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header,sapi_headers_stru
                }
                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 (sapi_header->replace) {
                apr_table_set(ctx->r->headers_out, sapi_header->header, val);
        } else {