- ditch TSRMLS_FETCH() occurences
[m6w6/ext-http] / http.c
diff --git a/http.c b/http.c
index 627f5b70dedf9b89c2e94809e8a3f4276fc57319..b1039ade5fa4024e3cb741a5afa0aaa5905436eb 100644 (file)
--- a/http.c
+++ b/http.c
@@ -57,6 +57,9 @@
 #      endif
 #      include <curl/curl.h>
 #endif
+#ifdef HTTP_HAVE_MHASH
+#      include <mhash.h>
+#endif
 
 #include <ctype.h>
 
@@ -147,8 +150,8 @@ static inline void http_globals_init(zend_http_globals *G)
 #ifdef HTTP_HAVE_CURL
        zend_llist_init(&G->request.copies.strings, sizeof(char *), http_request_data_free_string, 0);
        zend_llist_init(&G->request.copies.slists, sizeof(struct curl_slist *), http_request_data_free_slist, 0);
-       zend_llist_init(&G->request.copies.contexts, sizeof(http_curl_callback_ctx *), http_request_data_free_context, 0);
-       zend_llist_init(&G->request.copies.convs, sizeof(http_curl_conv *), http_request_data_free_conv, 0);
+       zend_llist_init(&G->request.copies.contexts, sizeof(http_request_callback_ctx *), http_request_data_free_context, 0);
+       zend_llist_init(&G->request.copies.convs, sizeof(http_request_conv *), http_request_data_free_conv, 0);
 #endif
 }
 
@@ -319,28 +322,29 @@ PHP_RSHUTDOWN_FUNCTION(http)
 /* {{{ PHP_MINFO_FUNCTION */
 PHP_MINFO_FUNCTION(http)
 {
-#ifdef HTTP_HAVE_CURL
-#      define HTTP_CURL_VERSION curl_version()
-#else
-#      define HTTP_CURL_VERSION "libcurl not available"
-#endif
-
        php_info_print_table_start();
        {
-               char full_version_string[1024] = {0};
-               snprintf(full_version_string, 1023, "%s (%s)", HTTP_PEXT_VERSION, HTTP_CURL_VERSION);
-
                php_info_print_table_row(2, "Extended HTTP support:", "enabled");
-               php_info_print_table_row(2, "Extension Version:", full_version_string);
+               php_info_print_table_row(2, "Extension Version:", HTTP_PEXT_VERSION);
 #ifdef HTTP_HAVE_CURL
-               php_info_print_table_row(2, "cURL HTTP Requests:", "enabled");
+               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_MHASH
-               php_info_print_table_row(2, "mhash ETag Generator:", "enabled");
+               {
+                       char mhash_info[32];
+                       
+                       snprintf(mhash_info, 32, "libmhash/%d", MHASH_API_VERSION);
+                       php_info_print_table_row(2, "mhash ETag Generator:", mhash_info);
+               }
 #else
                php_info_print_table_row(2, "mhash ETag Generator:", "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