X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_url_api.h;h=4d5cb46059aa7457940fc15fc3199ad4b94a2d5d;hp=cc7951dbbf31c5135af79066a617a100bc8b1863;hb=c4bf0a26f53d88dc8724d96e599a3867113da2be;hpb=4e2ecc5ed84649ce20fd1f11319626e0b1befa0a diff --git a/php_http_url_api.h b/php_http_url_api.h index cc7951d..4d5cb46 100644 --- a/php_http_url_api.h +++ b/php_http_url_api.h @@ -27,11 +27,18 @@ PHP_HTTP_API char *_http_absolute_url(const char *url TSRMLS_DC); #define HTTP_URL_JOIN_QUERY 0x002 #define HTTP_URL_STRIP_USER 0x004 #define HTTP_URL_STRIP_PASS 0x008 -#define HTTP_URL_STRIP_AUTH 0x010 +#define HTTP_URL_STRIP_AUTH (HTTP_URL_STRIP_USER|HTTP_URL_STRIP_PASS) #define HTTP_URL_STRIP_PORT 0x020 #define HTTP_URL_STRIP_PATH 0x040 #define HTTP_URL_STRIP_QUERY 0x080 #define HTTP_URL_STRIP_FRAGMENT 0x100 +#define HTTP_URL_STRIP_ALL ( \ + HTTP_URL_STRIP_AUTH | \ + HTTP_URL_STRIP_PORT | \ + HTTP_URL_STRIP_PATH | \ + HTTP_URL_STRIP_QUERY | \ + HTTP_URL_STRIP_FRAGMENT \ +) #define http_build_url(f, o, n, p, s, l) _http_build_url((f), (o), (n), (p), (s), (l) TSRMLS_CC) PHP_HTTP_API void _http_build_url(int flags, const php_url *old_url, const php_url *new_url, php_url **url_ptr, char **url_str, size_t *url_len TSRMLS_DC); @@ -101,8 +108,7 @@ static inline HashTable *_http_url_tostruct(php_url *url, zval *strct TSRMLS_DC) zval arr; if (strct) { - switch (Z_TYPE_P(strct)) - { + switch (Z_TYPE_P(strct)) { default: zval_dtor(strct); array_init(strct);