projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
tagged 1.7.2
[m6w6/ext-http]
/
http_url_api.c
diff --git
a/http_url_api.c
b/http_url_api.c
index bdfd2cfc7e96d24b1f8b53afdf866bc813c50731..8a70b0f2fb18b3435110b436b7f1f68023cafb15 100644
(file)
--- a/
http_url_api.c
+++ b/
http_url_api.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-20
07
, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-20
10
, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
+--------------------------------------------------------------------+
*/
@@
-175,6
+175,7
@@
PHP_HTTP_API void _http_build_url(int flags, const php_url *old_url, const php_u
default:
#endif
case 80:
default:
#endif
case 80:
+ case 0:
url->scheme = estrndup("http", lenof("http"));
break;
url->scheme = estrndup("http", lenof("http"));
break;
@@
-445,9
+446,7
@@
PHP_HTTP_API STATUS _http_urlencode_hash_recursive(HashTable *ht, phpstr *str, c
return FAILURE;
}
} else {
return FAILURE;
}
} else {
- zval val = zval_used_for_init;
- ZVAL_ZVAL(&val, *data, 1, 0);
- convert_to_string(&val);
+ zval *val = http_zsep(IS_STRING, *data);
if (PHPSTR_LEN(str)) {
phpstr_append(str, arg_sep, arg_sep_len);
if (PHPSTR_LEN(str)) {
phpstr_append(str, arg_sep, arg_sep_len);
@@
-455,16
+454,16
@@
PHP_HTTP_API STATUS _http_urlencode_hash_recursive(HashTable *ht, phpstr *str, c
phpstr_append(str, PHPSTR_VAL(&new_prefix), PHPSTR_LEN(&new_prefix));
phpstr_appends(str, "=");
phpstr_append(str, PHPSTR_VAL(&new_prefix), PHPSTR_LEN(&new_prefix));
phpstr_appends(str, "=");
- if (Z_STRLEN
(val) && Z_STRVAL
(val)) {
+ if (Z_STRLEN
_P(val) && Z_STRVAL_P
(val)) {
char *encoded_val;
int encoded_len;
char *encoded_val;
int encoded_len;
- encoded_val = php_url_encode(Z_STRVAL
(val), Z_STRLEN
(val), &encoded_len);
+ encoded_val = php_url_encode(Z_STRVAL
_P(val), Z_STRLEN_P
(val), &encoded_len);
phpstr_append(str, encoded_val, encoded_len);
efree(encoded_val);
}
phpstr_append(str, encoded_val, encoded_len);
efree(encoded_val);
}
- zval_dtor(&val);
+ zval_
ptr_
dtor(&val);
}
phpstr_dtor(&new_prefix);
}
}
phpstr_dtor(&new_prefix);
}