-/* {{{ proto string http_absolute_uri(string url[, string proto])
- *
- * This function returns an absolute URI constructed from url.
- * If the url is already abolute but a different proto was supplied,
- * only the proto part of the URI will be updated. If url has no
- * path specified, the path of the current REQUEST_URI will be taken.
- * The host will be taken either from the Host HTTP header of the client
- * the SERVER_NAME or just localhost if prior are not available.
- *
- * Some examples:
- * <pre>
- * url = "page.php" => http://www.example.com/current/path/page.php
- * url = "/page.php" => http://www.example.com/page.php
- * url = "/page.php", proto = "https" => https://www.example.com/page.php
- * </pre>
- *
- */
-PHP_FUNCTION(http_absolute_uri)
+/* {{{ HttpUtil */
+
+zend_class_entry *http_util_ce;
+
+#define HTTP_UTIL_ME(me, al, ai) ZEND_FENTRY(me, ZEND_FN(al), ai, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+
+zend_function_entry http_util_class_methods[] = {
+ HTTP_UTIL_ME(date, http_date, NULL)
+ HTTP_UTIL_ME(absoluteURI, http_absolute_uri, NULL)
+ HTTP_UTIL_ME(negotiateLanguage, http_negotiate_language, NULL)
+ HTTP_UTIL_ME(negotiateCharset, http_negotiate_charset, NULL)
+ HTTP_UTIL_ME(redirect, http_redirect, NULL)
+ HTTP_UTIL_ME(sendStatus, http_send_status, NULL)
+ HTTP_UTIL_ME(sendLastModified, http_send_last_modified, NULL)
+ HTTP_UTIL_ME(sendContentType, http_send_content_type, NULL)
+ HTTP_UTIL_ME(sendContentDisposition, http_send_content_disposition, NULL)
+ HTTP_UTIL_ME(matchModified, http_match_modified, NULL)
+ HTTP_UTIL_ME(matchEtag, http_match_etag, NULL)
+ HTTP_UTIL_ME(cacheLastModified, http_cache_last_modified, NULL)
+ HTTP_UTIL_ME(cacheEtag, http_cache_etag, NULL)
+ HTTP_UTIL_ME(chunkedDecode, http_chunked_decode, NULL)
+ HTTP_UTIL_ME(splitResponse, http_split_response, NULL)
+ HTTP_UTIL_ME(parseHeaders, http_parse_headers, NULL)
+ HTTP_UTIL_ME(getRequestHeaders, http_get_request_headers, NULL)
+#ifdef HTTP_HAVE_CURL
+ HTTP_UTIL_ME(get, http_get, http_request_info_ref_3)
+ HTTP_UTIL_ME(head, http_head, http_request_info_ref_3)
+ HTTP_UTIL_ME(postData, http_post_data, http_request_info_ref_4)
+ HTTP_UTIL_ME(postArray, http_post_array, http_request_info_ref_4)
+#endif
+ HTTP_UTIL_ME(authBasic, http_auth_basic, NULL)
+ HTTP_UTIL_ME(authBasicCallback, http_auth_basic_cb, NULL)
+ {NULL, NULL, NULL}
+};
+/* }}} HttpUtil */
+
+/* {{{ HttpMessage */
+zend_class_entry *http_message_ce;
+static zend_object_handlers http_message_object_handlers;
+
+#define HTTP_MSG_PROPHASH_TYPE 276192743LU
+#define HTTP_MSG_PROPHASH_HTTP_VERSION 1138628683LU
+#define HTTP_MSG_PROPHASH_RAW 2090679983LU
+#define HTTP_MSG_PROPHASH_BODY 254474387LU
+#define HTTP_MSG_PROPHASH_HEADERS 3199929089LU
+#define HTTP_MSG_PROPHASH_NESTED_MESSAGE 3652857165LU
+#define HTTP_MSG_PROPHASH_REQUEST_METHOD 1669022159LU
+#define HTTP_MSG_PROPHASH_REQUEST_URI 3208695486LU
+#define HTTP_MSG_PROPHASH_RESPONSE_STATUS 3857097400LU
+
+#define http_message_object_read_prop _http_message_object_read_prop
+static zval *_http_message_object_read_prop(zval *object, zval *member, int type TSRMLS_DC)