From 7bc4ffd0a40b212224d80dd8b0d1ca5239979e80 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Thu, 5 Apr 2018 16:49:32 -1000 Subject: [PATCH] Revert "Proxy: Refactor DNS name parsing and normalization (#673)" (#700) This reverts commit 311ef410a8baf513153e060ec0f60d9e803af28e. Signed-off-by: Brian Smith --- proxy/src/config.rs | 4 +- proxy/src/control/discovery.rs | 83 +++++--------- proxy/src/control/mod.rs | 10 +- proxy/src/dns.rs | 91 ++------------- proxy/src/fully_qualified_authority.rs | 150 ++++++++++++++++--------- proxy/src/lib.rs | 5 +- proxy/src/outbound.rs | 107 +++++++++--------- proxy/src/transport/connect.rs | 35 ++---- proxy/src/transport/mod.rs | 2 +- 9 files changed, 207 insertions(+), 280 deletions(-) diff --git a/proxy/src/config.rs b/proxy/src/config.rs index 2ccdd5607..d79bbf746 100644 --- a/proxy/src/config.rs +++ b/proxy/src/config.rs @@ -349,7 +349,7 @@ fn parse_url(s: &str) -> Result { // https://github.com/hyperium/http/issues/127. For now just ignore any // fragment that is there. - HostAndPort::normalize(authority, None) + HostAndPort::try_from(authority) .map_err(|e| ParseError::UrlError(UrlError::AuthorityError(e))) } @@ -366,7 +366,7 @@ fn parse(strings: &Strings, name: &str, parse: Parse) -> Result