projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Added "protocol" option that allows changing of the HTTP protocol used for
[m6w6/ext-http]
/
http_request_object.c
diff --git
a/http_request_object.c
b/http_request_object.c
index 177d3b800165548aeccb44c05648b6c9c155341a..5e233adabf44a62c6044d0af5c607b64eefd5e5a 100644
(file)
--- a/
http_request_object.c
+++ b/
http_request_object.c
@@
-6,7
+6,7
@@
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-200
5
, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-200
6
, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
+--------------------------------------------------------------------+
*/
@@
-403,6
+403,11
@@
static inline void _http_request_object_declare_default_properties(TSRMLS_D)
/* WebDAV Access Control - RFC 3744 */
DCL_CONST(long, "METH_ACL", HTTP_ACL);
/* WebDAV Access Control - RFC 3744 */
DCL_CONST(long, "METH_ACL", HTTP_ACL);
+ /* cURL HTTP protocol versions */
+ DCL_CONST(long, "VERSION_1_0", CURL_HTTP_VERSION_1_0);
+ DCL_CONST(long, "VERSION_1_1", CURL_HTTP_VERSION_1_1);
+ DCL_CONST(long, "VERSION_NONE", CURL_HTTP_VERSION_NONE);
+
/*
* Auth Constants
*/
/*
* Auth Constants
*/
@@
-606,7
+611,11
@@
STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this
http_request_info(obj->request, Z_ARRVAL_P(info));
SET_PROP(responseInfo, info);
zval_ptr_dtor(&info);
http_request_info(obj->request, Z_ARRVAL_P(info));
SET_PROP(responseInfo, info);
zval_ptr_dtor(&info);
-
+
+ if (zend_hash_exists(&Z_OBJCE_P(getThis())->function_table, "onfinish", sizeof("onfinish"))) {
+ zend_call_method_with_0_params(&getThis(), Z_OBJCE_P(getThis()), NULL, "onfinish", NULL);
+ }
+
return SUCCESS;
}
}
return SUCCESS;
}
}