/* $Id$ */
-#define _WINSOCKAPI_
-#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+#ifdef HTTP_HAVE_CURL
+# ifdef PHP_WIN32
+# include <winsock2.h>
+# endif
+# include <curl/curl.h>
+#endif
+
#include "php.h"
#include "php_ini.h"
#include "snprintf.h"
#endif
#ifdef HTTP_HAVE_CURL
-
-# ifdef PHP_WIN32
-# include <winsock2.h>
-# include <sys/types.h>
-# endif
-
-# include <curl/curl.h>
-
/* {{{ ARG_INFO */
# ifdef ZEND_BEGIN_ARG_INFO
ZEND_BEGIN_ARG_INFO(http_request_info_ref_3, 0)
}
PHP_INI_BEGIN()
- STD_PHP_INI_ENTRY("http.allowed_methods", "OPTIONS,GET,HEAD,POST,PUT,DELETE,TRACE,CONNECT", PHP_INI_ALL, update_allowed_methods, allowed_methods, zend_http_globals, http_globals)
+ STD_PHP_INI_ENTRY("http.allowed_methods",
+ /* HTTP 1.1 */
+ "GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, CONNECT, "
+ /* WebDAV - RFC 2518 * /
+ "PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, "
+ /* WebDAV Versioning - RFC 3253 * /
+ "VERSION-CONTROL, REPORT, CHECKOUT, CHECKIN, UNCHECKOUT, "
+ "MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, "
+ /* WebDAV Access Control - RFC 3744 * /
+ "ACL, "
+ /* END */
+ ,
+ PHP_INI_ALL, update_allowed_methods, allowed_methods, zend_http_globals, http_globals)
PHP_INI_END()
/* }}} */
/* {{{ PHP_MINFO_FUNCTION */
PHP_MINFO_FUNCTION(http)
{
- php_info_print_table_start();
- php_info_print_table_header(2, "Extended HTTP support", "enabled");
- php_info_print_table_row(2, "Version:", PHP_EXT_HTTP_VERSION);
- php_info_print_table_row(2, "cURL convenience functions:",
+#ifdef ZEND_ENGINE_2
+# define HTTP_FUNC_AVAIL(CLASS) "procedural, object oriented (class " CLASS ")"
+#else
+# define HTTP_FUNC_AVAIL(CLASS) "procedural"
+#endif
+
#ifdef HTTP_HAVE_CURL
- "enabled"
+# define HTTP_CURL_VERSION curl_version()
+# ifdef ZEND_ENGINE_2
+# define HTTP_CURL_AVAIL(CLASS) "procedural, object oriented (class " CLASS ")"
+# else
+# define HTTP_CURL_AVAIL(CLASS) "procedural"
+# endif
#else
- "disabled"
+# define HTTP_CURL_VERSION "libcurl not available"
+# define HTTP_CURL_AVAIL(CLASS) "libcurl not available"
#endif
- );
+
+ char full_version_string[1024] = {0};
+ snprintf(full_version_string, 1023, "%s (%s)", PHP_EXT_HTTP_VERSION, HTTP_CURL_VERSION);
+
+ php_info_print_table_start();
+ 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_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("HTTPi"));
+ php_info_print_table_row(2, "Extended HTTP Responses:", HTTP_FUNC_AVAIL("HTTPi_Response"));
+ php_info_print_table_row(2, "Extended HTTP Requests:", HTTP_CURL_AVAIL("HTTPi_Request"));
php_info_print_table_end();
DISPLAY_INI_ENTRIES();