]> granicus.if.org Git - php/commitdiff
Make url encoding/decoding functions use binary strings only.
authorAndrei Zmievski <andrei@php.net>
Thu, 26 Oct 2006 17:33:33 +0000 (17:33 +0000)
committerAndrei Zmievski <andrei@php.net>
Thu, 26 Oct 2006 17:33:33 +0000 (17:33 +0000)
ext/standard/base64.c
ext/standard/url.c

index 7b639159183791cc6e88fc448e48852b5e4f6ed5..7f9b497b1f3686bb4c019c027e7385501fbc45e9 100644 (file)
@@ -203,7 +203,7 @@ PHPAPI unsigned char *php_base64_decode_ex(const unsigned char *str, int length,
 }
 /* }}} */
 
-/* {{{ proto string base64_encode(string str) U
+/* {{{ proto binary base64_encode(binary str) U
    Encodes string using MIME base64 algorithm */
 PHP_FUNCTION(base64_encode)
 {
@@ -224,7 +224,7 @@ PHP_FUNCTION(base64_encode)
 /* }}} */
 
 
-/* {{{ proto string base64_decode(string str[, bool strict]) U
+/* {{{ proto binary base64_decode(binary str[, bool strict]) U
    Decodes string using MIME base64 algorithm */
 PHP_FUNCTION(base64_decode)
 {
index 06b53d58e737ae6fb6f14ff0ca5fc2c1f05bd054..240bde737bdd1a0c6c6641b4929585e011270f85 100644 (file)
@@ -488,14 +488,14 @@ PHPAPI char *php_url_encode(char const *s, int len, int *new_length)
 }
 /* }}} */
 
-/* {{{ proto string urlencode(string str)
+/* {{{ proto string urlencode(binary str) U
    URL-encodes string */
 PHP_FUNCTION(urlencode)
 {
        char *in_str, *out_str;
        int in_str_len, out_str_len;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &in_str,
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S", &in_str,
                                                          &in_str_len) == FAILURE) {
                return;
        }
@@ -505,7 +505,7 @@ PHP_FUNCTION(urlencode)
 }
 /* }}} */
 
-/* {{{ proto string urldecode(string str)
+/* {{{ proto binary urldecode(binary str) U
    Decodes URL-encoded string */
 PHP_FUNCTION(urldecode)
 {
@@ -589,7 +589,7 @@ PHPAPI char *php_raw_url_encode(char const *s, int len, int *new_length)
 }
 /* }}} */
 
-/* {{{ proto string rawurlencode(string str)
+/* {{{ proto binary rawurlencode(binary str) U
    URL-encodes string */
 PHP_FUNCTION(rawurlencode)
 {
@@ -606,7 +606,7 @@ PHP_FUNCTION(rawurlencode)
 }
 /* }}} */
 
-/* {{{ proto string rawurldecode(string str)
+/* {{{ proto binary rawurldecode(binary str) U
    Decodes URL-encodes string */
 PHP_FUNCTION(rawurldecode)
 {