From: Michael Wallner Date: Wed, 24 Aug 2005 10:53:51 +0000 (+0000) Subject: - include missing.h in http.c for static property fixup X-Git-Tag: RELEASE_0_12_0~22 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=a4b593d03ef14d9bc422cbe6ce471a7b5b8abe5d - include missing.h in http.c for static property fixup - don't free the http message in http_message_tostruct_recursive() but where it was allocated - use the "standard" way in RETVAL_OBJVAL() --- diff --git a/KnownIssues.txt b/KnownIssues.txt index 0a9dc3f..dfe8c82 100644 --- a/KnownIssues.txt +++ b/KnownIssues.txt @@ -4,3 +4,6 @@ $Id$ HttpResponse class is infunctional with current ZendEngine2, a fix is pending. + +http_chunked_decode() still depends on CRLF. + diff --git a/http.c b/http.c index 444341e..990c008 100644 --- a/http.c +++ b/http.c @@ -44,6 +44,7 @@ # include "php_http_exception_object.h" #endif +#include "missing.h" #include "phpstr/phpstr.h" #ifdef HTTP_HAVE_CURL diff --git a/http_functions.c b/http_functions.c index ced4e81..2bcdd21 100644 --- a/http_functions.c +++ b/http_functions.c @@ -679,6 +679,7 @@ PHP_FUNCTION(http_parse_message) if (msg = http_message_parse(message, message_len)) { object_init(return_value); http_message_tostruct_recursive(msg, return_value); + http_message_free(&msg); } else { RETURN_NULL(); } diff --git a/http_message_api.c b/http_message_api.c index 5a2bdb7..76a557b 100644 --- a/http_message_api.c +++ b/http_message_api.c @@ -353,8 +353,6 @@ PHP_HTTP_API void _http_message_tostruct_recursive(http_message *msg, zval *obj } else { add_assoc_null(&strct, "parentMessage"); } - http_message_dtor(msg); - efree(msg); } PHP_HTTP_API STATUS _http_message_send(http_message *message TSRMLS_DC) diff --git a/http_message_object.c b/http_message_object.c index 108848b..71c06d5 100644 --- a/http_message_object.c +++ b/http_message_object.c @@ -776,7 +776,6 @@ PHP_METHOD(HttpMessage, getHttpVersion) IF_RETVAL_USED { char ver[4] = {0}; - double version; getObject(http_message_object, obj); sprintf(ver, "%1.1lf", obj->message->http.version); diff --git a/php_http_info_api.h b/php_http_info_api.h index cd229ed..9dd64c8 100644 --- a/php_http_info_api.h +++ b/php_http_info_api.h @@ -56,7 +56,7 @@ PHP_HTTP_API void _http_info_default_callback(void **nothing, HashTable **header PHP_HTTP_API void _http_info_dtor(http_info *info); #define http_info_parse(p, i) _http_info_parse_ex((p), (i), 1 TSRMLS_CC) #define http_info_parse_ex(p, i, s) _http_info_parse_ex((p), (i), (s) TSRMLS_CC) -PHP_HTTP_API STATUS _http__infoparse_ex(const char *pre_header, http_info *info , zend_bool silent TSRMLS_DC); +PHP_HTTP_API STATUS _http_info_parse_ex(const char *pre_header, http_info *info , zend_bool silent TSRMLS_DC); #endif diff --git a/php_http_std_defs.h b/php_http_std_defs.h index 8bef4f8..763a8cf 100644 --- a/php_http_std_defs.h +++ b/php_http_std_defs.h @@ -65,7 +65,9 @@ typedef int STATUS; return_value->is_ref = 1; \ return_value->type = IS_OBJECT; \ return_value->value.obj = (ov); \ - zend_objects_store_add_ref(return_value TSRMLS_CC) + if (Z_OBJ_HT_P(return_value)) { \ + Z_OBJ_HT_P(return_value)->add_ref(return_value TSRMLS_CC); \ + } #define RETURN_OBJVAL(ov) \ RETVAL_OBJVAL(ov); \ return