X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_url_api.c;h=8a70b0f2fb18b3435110b436b7f1f68023cafb15;hp=f67d91a3e40a1a66773f3f9c2095e642a3e008f6;hb=refs%2Fheads%2Fv1.7.x;hpb=51669004bbd20bcb4cd9d509799ff65e3998ea47 diff --git a/http_url_api.c b/http_url_api.c index f67d91a..8a70b0f 100644 --- 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. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2007, Michael Wallner | + | Copyright (c) 2004-2010, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -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: + case 0: url->scheme = estrndup("http", lenof("http")); break; @@ -445,7 +446,7 @@ PHP_HTTP_API STATUS _http_urlencode_hash_recursive(HashTable *ht, phpstr *str, c return FAILURE; } } else { - zval *val = zval_copy(IS_STRING, *data); + zval *val = http_zsep(IS_STRING, *data); if (PHPSTR_LEN(str)) { phpstr_append(str, arg_sep, arg_sep_len); @@ -462,7 +463,7 @@ PHP_HTTP_API STATUS _http_urlencode_hash_recursive(HashTable *ht, phpstr *str, c efree(encoded_val); } - zval_free(&val); + zval_ptr_dtor(&val); } phpstr_dtor(&new_prefix); }