1
0
mirror of https://github.com/php/php-src.git synced 2026-04-01 21:22:13 +02:00

Merge branch 'PHP-7.0'

* PHP-7.0:
  update NEWS
  update NEWS
  Simplify code per Anatol.
  Insert bug number.
  Use strtoll() when apr_off_t is 64 bits.
This commit is contained in:
Anatol Belski
2016-01-11 21:45:42 +01:00

View File

@@ -123,15 +123,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")) {
#ifdef PHP_WIN32
# 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
apr_off_t clen = 0;
if (APR_SUCCESS != apr_strtoff(&clen, val, (char **) NULL, 10)) {
/* We'll fall back to strtol, since that's what we used to
* do anyway. */
clen = (apr_off_t) strtol(val, (char **) NULL, 10);
}
ap_set_content_length(ctx->r, clen);
} else if (op == SAPI_HEADER_REPLACE) {
apr_table_set(ctx->r->headers_out, sapi_header->header, val);
} else {