From a518dea1e45ce14ed5d0e5d1a23de2e8f9c3f5f5 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 27 Dec 2015 12:48:59 +0000 Subject: [PATCH] get_destination_from_headers(): Remove dead code --- parsers.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/parsers.c b/parsers.c index 630537a3..eed559aa 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.298 2015/01/24 16:41:51 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.299 2015/03/27 12:39:44 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -4402,6 +4402,8 @@ jb_err get_destination_from_headers(const struct list *headers, struct http_requ char *p; char *host; + assert(!http->ssl); + host = get_header_value(headers, "Host:"); if (NULL == host) @@ -4427,12 +4429,12 @@ jb_err get_destination_from_headers(const struct list *headers, struct http_requ } else { - http->port = http->ssl ? 443 : 80; + http->port = 80; } /* Rebuild request URL */ freez(http->url); - http->url = strdup(http->ssl ? "https://" : "http://"); + http->url = strdup("http://"); string_append(&http->url, http->hostport); string_append(&http->url, http->path); if (http->url == NULL) -- 2.39.2