summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAzat Khuzhin <azat@libevent.org>2020-10-27 01:40:34 +0300
committerAzat Khuzhin <azat@libevent.org>2020-10-27 02:13:21 +0300
commite91c4363889cee1de57a8ffa38c24a8127b37c78 (patch)
treec164aa18c79ab760330f00973ae39186dc6bc165 /include
parenteb822ac751dd2559b9ea3a04ec4978fe2733f6ce (diff)
downloadlibevent-e91c4363889cee1de57a8ffa38c24a8127b37c78.tar.gz
http: add EVHTTP_URI_HOST_STRIP_BRACKETS
Refs: #1115
Diffstat (limited to 'include')
-rw-r--r--include/event2/http.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/event2/http.h b/include/event2/http.h
index aef8a45b..d32bd0b3 100644
--- a/include/event2/http.h
+++ b/include/event2/http.h
@@ -1378,6 +1378,15 @@ struct evhttp_uri *evhttp_uri_parse_with_flags(const char *source_uri,
* </ul>
*/
#define EVHTTP_URI_NONCONFORMANT 0x01
+/**
+ * Strip brackets from the IPv6 address and only for evhttp_uri_get_host(),
+ * evhttp_uri_join() returns the host with brackets.
+ *
+ * Thus you can use host part of the evhttp_uri for getaddrinfo().
+ *
+ * @see also _EVHTTP_URI_HOST_HAS_BRACKETS
+ */
+#define EVHTTP_URI_HOST_STRIP_BRACKETS 0x04
/** Alias for evhttp_uri_parse_with_flags(source_uri, 0) */
EVENT2_EXPORT_SYMBOL