Fixed wrong host name

SVN revision: 2493
This commit is contained in:
2013-06-10 13:55:57 +00:00
parent b9c76ad18a
commit 0a947f348e
+5 -1
View File
@@ -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);