- fix build
authorMichael Wallner <mike@php.net>
Mon, 26 Dec 2005 17:16:46 +0000 (17:16 +0000)
committerMichael Wallner <mike@php.net>
Mon, 26 Dec 2005 17:16:46 +0000 (17:16 +0000)
http.c
http_encoding_api.c

diff --git a/http.c b/http.c
index 5da35c5e1ed2376ba07c0c6824159a19d142d2fa..2cc838508ce08922159fa5deb17273fe3119cfa6 100644 (file)
--- 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");
        {
index 6f49ee18fa434d0aad9ef12280fcdb9edb1418c8..f57add91cff00ce9c5a1ae6895db82961078e5d9 100644 (file)
@@ -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);
        }