changeset 19188:3a942625aaa0

lib-http: client: Tunneled https peer addresses were not compared properly. The https_name field was ignored in that case.
author Stephan Bosch <stephan@rename-it.nl>
date Tue, 22 Sep 2015 21:16:51 +0300
parents 1b1dbfaf7daa
children 1afdeb1cae62
files src/lib-http/http-client-peer.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-http/http-client-peer.c	Tue Sep 22 21:16:34 2015 +0300
+++ b/src/lib-http/http-client-peer.c	Tue Sep 22 21:16:51 2015 +0300
@@ -88,7 +88,8 @@
 			return ret;
 		if (peer1->a.tcp.port != peer2->a.tcp.port)
 			return (peer1->a.tcp.port > peer2->a.tcp.port ? 1 : -1);
-		if (peer1->type != HTTP_CLIENT_PEER_ADDR_HTTPS)
+		if (peer1->type != HTTP_CLIENT_PEER_ADDR_HTTPS &&
+			peer1->type != HTTP_CLIENT_PEER_ADDR_HTTPS_TUNNEL)
 			return 0;
 		return null_strcmp
 			(peer1->a.tcp.https_name, peer2->a.tcp.https_name);