projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
3e696a1
)
- fix option setting
author
Michael Wallner
<mike@php.net>
Wed, 27 Jul 2005 16:38:07 +0000
(16:38 +0000)
committer
Michael Wallner
<mike@php.net>
Wed, 27 Jul 2005 16:38:07 +0000
(16:38 +0000)
http_request_object.c
patch
|
blob
|
history
diff --git
a/http_request_object.c
b/http_request_object.c
index bca9bcb5b6a8188cb339349afbea6b4495feb9b3..761e9ca4fda6bc9c280118dfaf2e508ef848d0b0 100644
(file)
--- a/
http_request_object.c
+++ b/
http_request_object.c
@@
-650,30
+650,33
@@
PHP_METHOD(HttpRequest, setOptions)
zval **headers;
if (SUCCESS == zend_hash_find(Z_ARRVAL_P(old_opts), "headers", sizeof("headers"), (void **) &headers)) {
array_merge(*opt, *headers);
zval **headers;
if (SUCCESS == zend_hash_find(Z_ARRVAL_P(old_opts), "headers", sizeof("headers"), (void **) &headers)) {
array_merge(*opt, *headers);
+ continue;
}
} else if (!strcmp(key, "cookies")) {
zval **cookies;
if (SUCCESS == zend_hash_find(Z_ARRVAL_P(old_opts), "cookies", sizeof("cookies"), (void **) &cookies)) {
array_merge(*opt, *cookies);
}
} else if (!strcmp(key, "cookies")) {
zval **cookies;
if (SUCCESS == zend_hash_find(Z_ARRVAL_P(old_opts), "cookies", sizeof("cookies"), (void **) &cookies)) {
array_merge(*opt, *cookies);
+ continue;
}
} else if ((!strcasecmp(key, "url")) || (!strcasecmp(key, "uri"))) {
if (Z_TYPE_PP(opt) != IS_STRING) {
convert_to_string_ex(opt);
}
UPD_PROP(obj, string, url, Z_STRVAL_PP(opt));
}
} else if ((!strcasecmp(key, "url")) || (!strcasecmp(key, "uri"))) {
if (Z_TYPE_PP(opt) != IS_STRING) {
convert_to_string_ex(opt);
}
UPD_PROP(obj, string, url, Z_STRVAL_PP(opt));
+ continue;
} else if (!strcmp(key, "method")) {
if (Z_TYPE_PP(opt) != IS_LONG) {
convert_to_long_ex(opt);
}
UPD_PROP(obj, long, method, Z_LVAL_PP(opt));
} else if (!strcmp(key, "method")) {
if (Z_TYPE_PP(opt) != IS_LONG) {
convert_to_long_ex(opt);
}
UPD_PROP(obj, long, method, Z_LVAL_PP(opt));
- } else {
- if (!strcmp(key, "ondebug")) {
- SET_PROP(obj, dbg_user_cb, *opt);
- }
- zval_add_ref(opt);
- add_assoc_zval(old_opts, key, *opt);
+ continue;
+ } else if (!strcmp(key, "ondebug")) {
+ SET_PROP(obj, dbg_user_cb, *opt);
}
}
+ zval_add_ref(opt);
+ add_assoc_zval(old_opts, key, *opt);
+
/* reset */
key = NULL;
}
/* reset */
key = NULL;
}