X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_object.c;h=b9e8af7f37ace2a5434ae77ebe601af8093e22b9;hp=8e0b7ce8bb8726c34add518cdb54f16ab29d45d5;hb=864a85259b0369033e49666603eed6661b01606c;hpb=8c131f561b503d35e854996b1798d268276463e6 diff --git a/http_request_object.c b/http_request_object.c index 8e0b7ce..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);