build and file maintenance
[m6w6/ext-http] / php_http_request.c
index d3ac782c793202830bdd8c7e7caec7c0aae08054..9d4819d24eb13c6b39377ae7d7cb1ee89a59a62b 100644 (file)
@@ -6,19 +6,16 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2010, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2011, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
-/* $Id: php_http_request_api.c 298591 2010-04-26 11:46:55Z mike $ */
-
 #include "php_http.h"
 
 #include <ext/spl/spl_observer.h>
 #include <ext/spl/spl_iterators.h>
 #include <Zend/zend_interfaces.h>
 
-
 PHP_HTTP_API php_http_request_t *php_http_request_init(php_http_request_t *h, php_http_request_ops_t *ops, php_http_resource_factory_t *rf, void *init_arg TSRMLS_DC)
 {
        php_http_request_t *free_h = NULL;
@@ -213,9 +210,7 @@ PHP_HTTP_BEGIN_ARGS(setMessageClass, 1)
 PHP_HTTP_END_ARGS;
 
 PHP_HTTP_EMPTY_ARGS(getResponseMessage);
-PHP_HTTP_EMPTY_ARGS(getRawResponseMessage);
 PHP_HTTP_EMPTY_ARGS(getRequestMessage);
-PHP_HTTP_EMPTY_ARGS(getRawRequestMessage);
 PHP_HTTP_EMPTY_ARGS(getHistory);
 PHP_HTTP_EMPTY_ARGS(clearHistory);
 PHP_HTTP_EMPTY_ARGS(send);
@@ -568,7 +563,7 @@ static inline void php_http_request_object_set_options_subr(INTERNAL_FUNCTION_PA
                        array_copy(Z_ARRVAL_P(old_opts), Z_ARRVAL_P(new_opts));
                }
 
-               if (SUCCESS == zend_hash_find(Z_ARRVAL_P(new_opts), key, len, (void *) &entry)) {
+               if (SUCCESS == zend_symtable_find(Z_ARRVAL_P(new_opts), key, len, (void *) &entry)) {
                        if (overwrite) {
                                zend_hash_clean(Z_ARRVAL_PP(entry));
                        }
@@ -602,7 +597,7 @@ static inline void php_http_request_object_get_options_subr(INTERNAL_FUNCTION_PA
                array_init(return_value);
 
                if (    (Z_TYPE_P(opts) == IS_ARRAY) &&
-                               (SUCCESS == zend_hash_find(Z_ARRVAL_P(opts), key, len, (void *) &options))) {
+                               (SUCCESS == zend_symtable_find(Z_ARRVAL_P(opts), key, len, (void *) &options))) {
                        convert_to_array(*options);
                        array_copy(Z_ARRVAL_PP(options), Z_ARRVAL_P(return_value));
                }
@@ -719,7 +714,7 @@ PHP_METHOD(HttpRequest, getTransferInfo)
                }
 
                if (info_len && info_name) {
-                       if (SUCCESS == zend_hash_find(Z_ARRVAL_P(info), php_http_pretty_key(info_name, info_len, 0, 0), info_len + 1, (void *) &infop)) {
+                       if (SUCCESS == zend_symtable_find(Z_ARRVAL_P(info), php_http_pretty_key(info_name, info_len, 0, 0), info_len + 1, (void *) &infop)) {
                                RETVAL_ZVAL(*infop, 1, 0);
                        } else {
                                php_http_error(HE_NOTICE, PHP_HTTP_E_INVALID_PARAM, "Could not find transfer info named %s", info_name);
@@ -791,7 +786,7 @@ PHP_METHOD(HttpRequest, setOptions)
                                } else if (Z_TYPE_PP(opt) == IS_NULL) {
                                        old_opts = zend_read_property(php_http_request_class_entry, getThis(), ZEND_STRL("options"), 0 TSRMLS_CC);
                                        if (Z_TYPE_P(old_opts) == IS_ARRAY) {
-                                               zend_hash_del(Z_ARRVAL_P(old_opts), key.str, key.len);
+                                               zend_symtable_del(Z_ARRVAL_P(old_opts), key.str, key.len);
                                        }
                                } else {
                                        Z_ADDREF_P(*opt);