From b20688d08c28e9733ba6c021f5eee460ee6bf07a Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 26 Dec 2005 17:16:46 +0000 Subject: [PATCH] - fix build --- http.c | 45 +++++++++++++++++++++++---------------------- http_encoding_api.c | 8 ++++++-- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/http.c b/http.c index 5da35c5..2cc8385 100644 --- a/http.c +++ b/http.c @@ -318,29 +318,8 @@ PHP_MINFO_FUNCTION(http) { php_info_print_table_start(); { - php_info_print_table_row(2, "Extended HTTP support", "enabled"); + php_info_print_table_row(2, "HTTP Support", "enabled"); php_info_print_table_row(2, "Extension Version", PHP_EXT_HTTP_VERSION); -#ifdef HTTP_HAVE_CURL - php_info_print_table_row(2, "cURL HTTP Requests", curl_version()); -#else - php_info_print_table_row(2, "cURL HTTP Requests", "disabled"); -#endif -#ifdef HTTP_HAVE_ZLIB - { - char my_zlib_version[64] = {0}; - - strlcat(my_zlib_version, "zlib/", 63); - strlcat(my_zlib_version, zlibVersion(), 63); - php_info_print_table_row(2, "zlib GZIP Encodings", my_zlib_version); - } -#else - php_info_print_table_row(2, "zlib GZIP Encodings", "disabled"); -#endif -#if defined(HTTP_HAVE_MAGIC) && !defined(WONKY) - php_info_print_table_row(2, "magic MIME Guessing", "libmagic/unknown"); -#else - php_info_print_table_row(2, "magic MIME Guessing", "disabled"); -#endif php_info_print_table_row(2, "Registered Classes", #ifndef ZEND_ENGINE_2 "none" @@ -359,6 +338,28 @@ PHP_MINFO_FUNCTION(http) } php_info_print_table_end(); + php_info_print_table_start(); + php_info_print_table_header(3, "Used Library", "Compiled", "Linked"); + { +#ifdef HTTP_HAVE_CURL + curl_version_info_data *cv = curl_version_info(CURLVERSION_NOW); + php_info_print_table_row(3, "libcurl", LIBCURL_VERSION, cv->version); +#else + php_info_print_table_row(2, "libcurl", "disabled", "disabled"); +#endif +#ifdef HTTP_HAVE_ZLIB + php_info_print_table_row(3, "libz", ZLIB_VERSION, zlibVersion()); +#else + php_info_print_table_row(3, "libz", "disabled", "disabled"); +#endif +#if defined(HTTP_HAVE_MAGIC) && !defined(WONKY) + php_info_print_table_row(3, "libmagic", "unknown", "unknown"); +#else + php_info_print_table_row(3, "libmagic", "disabled", "disabled"); +#endif + } + php_info_print_table_end(); + php_info_print_table_start(); php_info_print_table_colspan_header(2, "Request Methods"); { diff --git a/http_encoding_api.c b/http_encoding_api.c index 6f49ee1..f57add9 100644 --- a/http_encoding_api.c +++ b/http_encoding_api.c @@ -43,10 +43,12 @@ PHP_MINIT_FUNCTION(http_encoding) PHP_RINIT_FUNCTION(http_encoding) { - if (HTTP_G(send).inflate.start_auto) { + getGlobals(G); + + if (G->send.inflate.start_auto) { php_ob_set_internal_handler(_http_ob_inflatehandler, 0x1000, "http inflate", 0 TSRMLS_CC); } - if (HTTP_G(send).deflate.start_auto) { + if (G->send.deflate.start_auto) { php_ob_set_internal_handler(_http_ob_deflatehandler, 0x8000, "http deflate", 0 TSRMLS_CC); } return SUCCESS; @@ -54,6 +56,8 @@ PHP_RINIT_FUNCTION(http_encoding) PHP_RSHUTDOWN_FUNCTION(http_encoding) { + getGlobals(G); + if (G->send.deflate.stream) { http_encoding_deflate_stream_free((http_encoding_stream **) &G->send.deflate.stream); } -- 2.30.2