changeset 12638:2ebd553876c8

RFC compliance patch by Eric Lammerts <eric@lammerts.org>
author alex
date Fri, 25 Jun 2004 15:14:27 +0000
parents 5dc89722fad2
children 1f7413e7d755
files libmpdemux/network.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/network.c	Fri Jun 25 14:57:01 2004 +0000
+++ b/libmpdemux/network.c	Fri Jun 25 15:14:27 2004 +0000
@@ -449,7 +449,10 @@
 		server_url = url;
 		http_set_uri( http_hdr, server_url->file );
 	}
-	snprintf(str, 256, "Host: %s", server_url->hostname );
+	if (server_url->port && server_url->port != 80)
+	    snprintf(str, 256, "Host: %s:%d", server_url->hostname, server_url->port );
+	else
+	    snprintf(str, 256, "Host: %s", server_url->hostname );
 	http_set_field( http_hdr, str);
 	if (network_useragent)
 	{