aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 5952a9bec..c9339210c 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3502,9 +3502,17 @@ static void fix_hostname(struct SessionHandle *data,
#elif defined(CURL_DISABLE_VERBOSE_STRINGS)
(void)conn;
#endif
+ size_t len;
/* set the name we use to display the host name */
host->dispname = host->name;
+
+ len = strlen(host->name);
+ if(host->name[len-1] == '.')
+ /* strip off a single trailing dot if present, primarily for SNI but
+ there's no use for it */
+ host->name[len-1]=0;
+
if(!is_ASCII_name(host->name)) {
#ifdef USE_LIBIDN
/*************************************************************