+PHP_MINIT_FUNCTION(http_request_method)
+{
+ /* HTTP/1.1 */
+ HTTP_LONG_CONSTANT("HTTP_METH_GET", HTTP_GET);
+ HTTP_LONG_CONSTANT("HTTP_METH_HEAD", HTTP_HEAD);
+ HTTP_LONG_CONSTANT("HTTP_METH_POST", HTTP_POST);
+ HTTP_LONG_CONSTANT("HTTP_METH_PUT", HTTP_PUT);
+ HTTP_LONG_CONSTANT("HTTP_METH_DELETE", HTTP_DELETE);
+ HTTP_LONG_CONSTANT("HTTP_METH_OPTIONS", HTTP_OPTIONS);
+ HTTP_LONG_CONSTANT("HTTP_METH_TRACE", HTTP_TRACE);
+ HTTP_LONG_CONSTANT("HTTP_METH_CONNECT", HTTP_CONNECT);
+ /* WebDAV - RFC 2518 */
+ HTTP_LONG_CONSTANT("HTTP_METH_PROPFIND", HTTP_PROPFIND);
+ HTTP_LONG_CONSTANT("HTTP_METH_PROPPATCH", HTTP_PROPPATCH);
+ HTTP_LONG_CONSTANT("HTTP_METH_MKCOL", HTTP_MKCOL);
+ HTTP_LONG_CONSTANT("HTTP_METH_COPY", HTTP_COPY);
+ HTTP_LONG_CONSTANT("HTTP_METH_MOVE", HTTP_MOVE);
+ HTTP_LONG_CONSTANT("HTTP_METH_LOCK", HTTP_LOCK);
+ HTTP_LONG_CONSTANT("HTTP_METH_UNLOCK", HTTP_UNLOCK);
+ /* WebDAV Versioning - RFC 3253 */
+ HTTP_LONG_CONSTANT("HTTP_METH_VERSION_CONTROL", HTTP_VERSION_CONTROL);
+ HTTP_LONG_CONSTANT("HTTP_METH_REPORT", HTTP_REPORT);
+ HTTP_LONG_CONSTANT("HTTP_METH_CHECKOUT", HTTP_CHECKOUT);
+ HTTP_LONG_CONSTANT("HTTP_METH_CHECKIN", HTTP_CHECKIN);
+ HTTP_LONG_CONSTANT("HTTP_METH_UNCHECKOUT", HTTP_UNCHECKOUT);
+ HTTP_LONG_CONSTANT("HTTP_METH_MKWORKSPACE", HTTP_MKWORKSPACE);
+ HTTP_LONG_CONSTANT("HTTP_METH_UPDATE", HTTP_UPDATE);
+ HTTP_LONG_CONSTANT("HTTP_METH_LABEL", HTTP_LABEL);
+ HTTP_LONG_CONSTANT("HTTP_METH_MERGE", HTTP_MERGE);
+ HTTP_LONG_CONSTANT("HTTP_METH_BASELINE_CONTROL", HTTP_BASELINE_CONTROL);
+ HTTP_LONG_CONSTANT("HTTP_METH_MKACTIVITY", HTTP_MKACTIVITY);
+ /* WebDAV Access Control - RFC 3744 */
+ HTTP_LONG_CONSTANT("HTTP_METH_ACL", HTTP_ACL);
+
+ return SUCCESS;
+}
+
+PHP_RSHUTDOWN_FUNCTION(http_request_method)
+{
+ int i, c = zend_hash_num_elements(&HTTP_G(request).methods.custom);
+
+ for (i = 0; i < c; ++i) {
+ http_request_method_unregister(HTTP_MAX_REQUEST_METHOD + i);
+ }
+
+ return SUCCESS;
+}
+