X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_object.c;h=7e2544669eea6aa6a99b18c462fd6e0dc1ca91ee;hp=bc2cfa014514fef54a6ef9c3c1db731f59c50114;hb=92d91587592727bbf0369e6eae8eba157063274d;hpb=84587a7d0dba04eb79c40806708ec3aa28d89ed6 diff --git a/http_request_object.c b/http_request_object.c index bc2cfa0..7e25446 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -32,6 +32,7 @@ #include "php_http_std_defs.h" #include "php_http_request_object.h" #include "php_http_request_api.h" +#include "php_http_request_pool_api.h" #include "php_http_api.h" #include "php_http_url_api.h" #include "php_http_message_api.h" @@ -301,7 +302,7 @@ STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this if (msg = http_message_parse(PHPSTR_VAL(&obj->response), PHPSTR_LEN(&obj->response))) { char *body; size_t body_len; - zval *headers, *message = GET_PROP(obj, responseMessage), *resp = GET_PROP(obj, responseData), *info = GET_PROP(obj, responseInfo); + zval *headers, *message, *resp = GET_PROP(obj, responseData), *info = GET_PROP(obj, responseInfo); UPD_PROP(obj, long, responseCode, msg->info.response.code); @@ -314,6 +315,8 @@ STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this add_assoc_zval(resp, "headers", headers); add_assoc_stringl(resp, "body", body, body_len, 0); + /* XXX */ + MAKE_STD_ZVAL(message); Z_TYPE_P(message) = IS_OBJECT; message->value.obj = http_message_object_from_msg(msg); SET_PROP(obj, responseMessage, message);