projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- http_build_url() replaces http_absolute_(url|uri)/http_build_uri;
[m6w6/ext-http]
/
http_request_object.c
diff --git
a/http_request_object.c
b/http_request_object.c
index 8280f976317eb86f02a86bdbf648793c145a0dd6..facd8e974e5fbd27f02efac7f9559adc38fb02f6 100644
(file)
--- a/
http_request_object.c
+++ b/
http_request_object.c
@@
-431,14
+431,8
@@
STATUS _http_request_object_requesthandler(http_request_object *obj, zval *this_
HTTP_CHECK_CURL_INIT(obj->request->ch, curl_easy_init(), return FAILURE);
URL = convert_to_type_ex(IS_STRING, GET_PROP(obj, url), &URL_p);
HTTP_CHECK_CURL_INIT(obj->request->ch, curl_easy_init(), return FAILURE);
URL = convert_to_type_ex(IS_STRING, GET_PROP(obj, url), &URL_p);
- obj->request->url = http_absolute_uri_ex(Z_STRVAL_P(URL), Z_STRLEN_P(URL), NULL, 0, NULL, 0, 0);
- if (URL_p) {
- zval_ptr_dtor(&URL_p);
- }
-
- if (!obj->request->url) {
- return FAILURE;
- }
+ obj->request->url = http_absolute_url(Z_STRVAL_P(URL));
+ if (URL_p) zval_ptr_dtor(&URL_p);
switch (obj->request->meth = Z_LVAL_P(convert_to_type_ex(IS_LONG, GET_PROP(obj, method), &meth_p)))
{
switch (obj->request->meth = Z_LVAL_P(convert_to_type_ex(IS_LONG, GET_PROP(obj, method), &meth_p)))
{
@@
-532,11
+526,11
@@
STATUS _http_request_object_requesthandler(http_request_object *obj, zval *this_
if (Z_STRLEN_P(qdata)) {
if (!strchr(obj->request->url, '?')) {
if (Z_STRLEN_P(qdata)) {
if (!strchr(obj->request->url, '?')) {
- strlcat(obj->request->url, "?", HTTP_UR
I
_MAXLEN);
+ strlcat(obj->request->url, "?", HTTP_UR
L
_MAXLEN);
} else {
} else {
- strlcat(obj->request->url, "&", HTTP_UR
I
_MAXLEN);
+ strlcat(obj->request->url, "&", HTTP_UR
L
_MAXLEN);
}
}
- strlcat(obj->request->url, Z_STRVAL_P(qdata), HTTP_UR
I
_MAXLEN);
+ strlcat(obj->request->url, Z_STRVAL_P(qdata), HTTP_UR
L
_MAXLEN);
}
http_request_prepare(obj->request, Z_ARRVAL_P(options));
}
http_request_prepare(obj->request, Z_ARRVAL_P(options));