X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=http_request_object.c;h=b9e8af7f37ace2a5434ae77ebe601af8093e22b9;hb=864a85259b0369033e49666603eed6661b01606c;hp=f8347f780877e1792cebe9fec9a7c3a13c1d6de0;hpb=bf7e7f73ea5db037b861f781e958f09a8af39b53;p=m6w6%2Fext-http diff --git a/http_request_object.c b/http_request_object.c index f8347f7..b9e8af7 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -653,7 +653,7 @@ STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this } UPD_PROP(long, responseCode, msg->http.info.response.code); - UPD_PROP(string, responseStatus, msg->http.info.response.status ? msg->http.info.response.status : ""); + UPD_PROP(string, responseStatus, STR_PTR(msg->http.info.response.status)); MAKE_STD_ZVAL(message); ZVAL_OBJVAL(message, http_message_object_new_ex(http_message_object_ce, msg, NULL), 0); @@ -1719,8 +1719,8 @@ PHP_METHOD(HttpRequest, getResponseHeader) getObjectEx(http_message_object, msg, message); if (header_len) { - if ((header = http_message_header_ex(msg->message, pretty_key(header_name, header_len, 1, 1), header_len + 1))) { - RETURN_ZVAL(header, 1, 0); + if ((header = http_message_header_ex(msg->message, pretty_key(header_name, header_len, 1, 1), header_len + 1, 0))) { + RETURN_ZVAL(header, 1, 1); } } else { array_init(return_value); @@ -1749,7 +1749,7 @@ PHP_METHOD(HttpRequest, getResponseCookies) long flags = 0; zval *allowed_extras_array = NULL; - if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|la", &flags, &allowed_extras_array)) { + if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|la!", &flags, &allowed_extras_array)) { int i = 0; ulong idx = 0; char *key = NULL, **allowed_extras = NULL;