- PHP_FE(ob_httpetaghandler, NULL)
- {NULL, NULL, NULL}
-};
-/* }}} */
-
-
-#ifdef ZEND_ENGINE_2
-
-/* {{{ 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 */
-
-/* {{{ HttpResponse */
-
-zend_class_entry *http_response_ce;
-static zend_object_handlers http_response_object_handlers;
-
-#define http_response_declare_default_properties(ce) _http_response_declare_default_properties(ce TSRMLS_CC)
-static inline void _http_response_declare_default_properties(zend_class_entry *ce TSRMLS_DC)
-{
- DCL_PROP(PROTECTED, string, contentType, "application/x-octetstream");
- DCL_PROP(PROTECTED, string, eTag, "");
- DCL_PROP(PROTECTED, string, dispoFile, "");
- DCL_PROP(PROTECTED, string, cacheControl, "public");
- DCL_PROP(PROTECTED, string, data, "");
- DCL_PROP(PROTECTED, string, file, "");
- DCL_PROP(PROTECTED, long, stream, 0);
- DCL_PROP(PROTECTED, long, lastModified, 0);
- DCL_PROP(PROTECTED, long, dispoInline, 0);
- DCL_PROP(PROTECTED, long, cache, 0);
- DCL_PROP(PROTECTED, long, gzip, 0);
-
- DCL_PROP(PRIVATE, long, raw_cache_header, 0);
- DCL_PROP(PRIVATE, long, send_mode, -1);
-}
-
-#define http_response_destroy_object _http_response_destroy_object
-void _http_response_destroy_object(void *object, zend_object_handle handle TSRMLS_DC)
-{
- http_response_object *o = object;
- if (OBJ_PROP(o)) {
- zend_hash_destroy(OBJ_PROP(o));
- FREE_HASHTABLE(OBJ_PROP(o));
- }
- efree(o);
-}
-
-#define http_response_new_object _http_response_new_object
-zend_object_value _http_response_new_object(zend_class_entry *ce TSRMLS_DC)
-{
- zend_object_value ov;
- http_response_object *o;
-
- o = ecalloc(1, sizeof(http_response_object));
- o->zo.ce = ce;
-
- ALLOC_HASHTABLE(OBJ_PROP(o));
- zend_hash_init(OBJ_PROP(o), 0, NULL, ZVAL_PTR_DTOR, 0);
- zend_hash_copy(OBJ_PROP(o), &ce->default_properties, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *));
-
- ov.handle = zend_objects_store_put(o, http_response_destroy_object, NULL, NULL TSRMLS_CC);
- ov.handlers = &http_response_object_handlers;
-
- return ov;
-}
-
-zend_function_entry http_response_class_methods[] = {
- PHP_ME(HttpResponse, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
-/* PHP_ME(HttpResponse, __destruct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR)
-*/
- PHP_ME(HttpResponse, setETag, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(HttpResponse, getETag, NULL, ZEND_ACC_PUBLIC)
-
- PHP_ME(HttpResponse, setContentDisposition, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(HttpResponse, getContentDisposition, NULL, ZEND_ACC_PUBLIC)
-
- PHP_ME(HttpResponse, setContentType, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(HttpResponse, getContentType, NULL, ZEND_ACC_PUBLIC)
-
- PHP_ME(HttpResponse, setCache, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(HttpResponse, getCache, NULL, ZEND_ACC_PUBLIC)
-
- PHP_ME(HttpResponse, setCacheControl, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(HttpResponse, getCacheControl, NULL, ZEND_ACC_PUBLIC)
-
- PHP_ME(HttpResponse, setGzip, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(HttpResponse, getGzip, NULL, ZEND_ACC_PUBLIC)
-
- PHP_ME(HttpResponse, setData, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(HttpResponse, getData, NULL, ZEND_ACC_PUBLIC)
-
- PHP_ME(HttpResponse, setFile, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(HttpResponse, getFile, NULL, ZEND_ACC_PUBLIC)
-
- PHP_ME(HttpResponse, setStream, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(HttpResponse, getStream, NULL, ZEND_ACC_PUBLIC)
-
- PHP_ME(HttpResponse, send, NULL, ZEND_ACC_PUBLIC)
-
- {NULL, NULL, NULL}