X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http.c;h=f0ffeae62d1648c58c288db26e319cac796eb435;hp=fc7f15a3964361f984200bc6403ebf905642351e;hb=e65e4aef04bbda60b8fb12985afbfaa069de9aee;hpb=302498d96ed22a09da4375bd955d07f04b6b36c4 diff --git a/http.c b/http.c index fc7f15a..f0ffeae 100644 --- a/http.c +++ b/http.c @@ -433,6 +433,35 @@ PHP_MINFO_FUNCTION(http) "http.chunked_decode, http.chunked_encode, http.deflate, http.inflate" #endif ); +#ifdef HTTP_HAVE_PERSISTENT_HANDLES + { + phpstr s; + HashTable *ht; + HashPosition pos; + HashKey key = initHashKey(0); + zval **val; + + if ((ht = http_persistent_handle_statall())) { + phpstr_init(&s); + + FOREACH_HASH_KEYVAL(pos, ht, key, val) { + phpstr_appendf(&s, "%s (%d), ", key.str, Z_LVAL_PP(val)); + } + zend_hash_destroy(ht); + FREE_HASHTABLE(ht); + + PHPSTR_LEN(&s) -= 2; /* get rid of last ", " */ + phpstr_fix(&s); + + php_info_print_table_row(2, "Persistent Handles", PHPSTR_VAL(&s)); + phpstr_dtor(&s); + } else { + php_info_print_table_row(2, "Persistent Handles", "none"); + } + } +#else + php_info_print_table_row(2, "Persistent Handles", "disabled"); +#endif } php_info_print_table_end();