projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- changelog
[m6w6/ext-http]
/
http_request_object.c
diff --git
a/http_request_object.c
b/http_request_object.c
index 8e0b7ce8bb8726c34add518cdb54f16ab29d45d5..7e110b9a534f76afb6c084933c30625d67ce2062 100644
(file)
--- 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);
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
*/
/*
* 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(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);
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) {
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);
}
} else {
array_init(return_value);