]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: http-url - Add http_url_init_authority_from().
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sun, 17 Nov 2019 14:01:26 +0000 (15:01 +0100)
committermartti.rannanjarvi <martti.rannanjarvi@open-xchange.com>
Sat, 18 Apr 2020 14:55:11 +0000 (14:55 +0000)
src/lib-http/http-url.c
src/lib-http/http-url.h

index 733e1097c2ffa5e9c8e02409d7d6c0b004f33bd0..229a58a0b3b7feb3306a7f456484d05d0b7dc8b5 100644 (file)
@@ -513,6 +513,15 @@ int http_url_request_target_parse(const char *request_target,
  * HTTP URL manipulation
  */
 
+void http_url_init_authority_from(struct http_url *dest,
+                                 const struct http_url *src)
+{
+       i_zero(dest);
+       dest->host = src->host;
+       dest->port = src->port;
+       dest->have_ssl = src->have_ssl;
+}
+
 void http_url_copy_authority(pool_t pool, struct http_url *dest,
                             const struct http_url *src)
 {
index f4e4273b3dddf8194ecc2aa8ae7ccf015f60955d..62d8922f35e908e1cc677fea32d646110eaba699 100644 (file)
@@ -76,6 +76,8 @@ static inline in_port_t http_url_get_port(const struct http_url *url)
  * HTTP URL manipulation
  */
 
+void http_url_init_authority_from(struct http_url *dest,
+                                 const struct http_url *src);
 void http_url_copy_authority(pool_t pool, struct http_url *dest,
                             const struct http_url *src);
 struct http_url *