X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_request_object.c;h=7e110b9a534f76afb6c084933c30625d67ce2062;hb=9793bf6f141f2aeba5f4671264e71eaeac761f06;hp=8e0b7ce8bb8726c34add518cdb54f16ab29d45d5;hpb=3952cccee20bf827c2c68ab121d2f5670a036660;p=m6w6%2Fext-http diff --git a/http_request_object.c b/http_request_object.c index 8e0b7ce..7e110b9 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -397,6 +397,13 @@ PHP_MINIT_FUNCTION(http_request_object) DCL_CONST(long, "VERSION_1_1", CURL_HTTP_VERSION_1_1); DCL_CONST(long, "VERSION_NONE", CURL_HTTP_VERSION_NONE); + /* + * DNS IPvX resolving + */ + DCL_CONST(long, "IPRESOLVE_V4", CURL_IPRESOLVE_V4); + DCL_CONST(long, "IPRESOLVE_V6", CURL_IPRESOLVE_V6); + DCL_CONST(long, "IPRESOLVE_ANY", CURL_IPRESOLVE_WHATEVER); + /* * Auth Constants */ @@ -653,7 +660,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 +1726,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);