From 0a947f348e00ffd25710ed50ab608fef25fc6a0b Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Mon, 10 Jun 2013 13:55:57 +0000 Subject: [PATCH] Fixed wrong host name SVN revision: 2493 --- src/elog.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/elog.c b/src/elog.c index 96d1ea9f..ca19a248 100755 --- a/src/elog.c +++ b/src/elog.c @@ -890,7 +890,11 @@ INT submit_elog(char *host, int port, int ssl, char *subdir, char *experiment, strcat(request, " HTTP/1.0\r\n"); sprintf(request + strlen(request), "Content-Type: multipart/form-data; boundary=%s\r\n", boundary); - sprintf(request + strlen(request), "Host: %s\r\n", host_name); + if (port != 80) + sprintf(str, "%s:%d", host, port); + else + sprintf(str, "%s", host); + sprintf(request + strlen(request), "Host: %s\r\n", str); sprintf(request + strlen(request), "User-Agent: ELOG\r\n"); sprintf(request + strlen(request), "Content-Length: %d\r\n", content_length);