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 81c051e2d37f37f03fde588e708e6e1367a7900c..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);
@@
-798,7
+805,7
@@
PHP_METHOD(HttpRequest, __construct)
zval *options = NULL;
SET_EH_THROW_HTTP();
zval *options = NULL;
SET_EH_THROW_HTTP();
- if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sla", &URL, &URL_len, &meth, &options)) {
+ if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sla
!
", &URL, &URL_len, &meth, &options)) {
if (URL) {
UPD_STRL(url, URL, URL_len);
}
if (URL) {
UPD_STRL(url, URL, URL_len);
}
@@
-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);
@@
-1749,7
+1756,7
@@
PHP_METHOD(HttpRequest, getResponseCookies)
long flags = 0;
zval *allowed_extras_array = NULL;
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;
int i = 0;
ulong idx = 0;
char *key = NULL, **allowed_extras = NULL;