- php_info_print_table_header(2, "Functionality", "Availability");
- php_info_print_table_row(2, "Miscellaneous Utilities:", HTTP_FUNC_AVAIL("HttpUtil, HttpMessage"));
- php_info_print_table_row(2, "Extended HTTP Responses:", HTTP_FUNC_AVAIL("HttpResponse"));
- php_info_print_table_row(2, "Extended HTTP Requests:", HTTP_CURL_AVAIL("HttpRequest"));
+ {
+ unsigned i;
+ zval **custom_method;
+ phpstr *known_request_methods = phpstr_new();
+ phpstr *custom_request_methods = phpstr_new();
+
+ for (i = HTTP_NO_REQUEST_METHOD+1; i < HTTP_MAX_REQUEST_METHOD; ++i) {
+ phpstr_appendl(known_request_methods, http_request_method_name(i));
+ phpstr_appends(known_request_methods, ", ");
+ }
+ FOREACH_HASH_VAL(&HTTP_G(request).methods.custom, custom_method) {
+ phpstr_append(custom_request_methods, Z_STRVAL_PP(custom_method), Z_STRLEN_PP(custom_method));
+ phpstr_appends(custom_request_methods, ", ");
+ }
+
+ phpstr_append(known_request_methods, PHPSTR_VAL(custom_request_methods), PHPSTR_LEN(custom_request_methods));
+ phpstr_fix(known_request_methods);
+ phpstr_fix(custom_request_methods);
+
+ php_info_print_table_row(2, "Known Request Methods:", PHPSTR_VAL(known_request_methods));
+ php_info_print_table_row(2, "Custom Request Methods:",
+ PHPSTR_LEN(custom_request_methods) ? PHPSTR_VAL(custom_request_methods) : "none registered");
+
+ phpstr_free(known_request_methods);
+ phpstr_free(custom_request_methods);
+ }
+ php_info_print_table_end();
+
+ php_info_print_table_start();
+ {
+ php_info_print_table_header(2, "Functionality", "Availability");
+ php_info_print_table_row(2, "Miscellaneous Utilities:", HTTP_FUNC_AVAIL("HttpUtil, HttpMessage"));
+ php_info_print_table_row(2, "Extended HTTP Responses:", HTTP_FUNC_AVAIL("HttpResponse"));
+ php_info_print_table_row(2, "Extended HTTP Requests:", HTTP_CURL_AVAIL("HttpRequest, HttpRequestPool"));
+ }