From 2f6396e310ee1f03df1563a3ee760654a4673607 Mon Sep 17 00:00:00 2001 From: bertrand Date: Tue, 18 Dec 2001 18:45:00 +0000 Subject: Added the Host field in the HTTP request. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3586 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/network.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libmpdemux/network.c') diff --git a/libmpdemux/network.c b/libmpdemux/network.c index 91d920ff57..b749afc113 100644 --- a/libmpdemux/network.c +++ b/libmpdemux/network.c @@ -154,9 +154,12 @@ connect2Server(char *host, int port) { int http_send_request( URL_t *url ) { HTTP_header_t *http_hdr; + char str[80]; int fd; http_hdr = http_new_header(); http_set_uri( http_hdr, url->file ); + snprintf(str, 80, "Host: %s", url->hostname ); + http_set_field( http_hdr, str); http_set_field( http_hdr, "User-Agent: MPlayer"); http_set_field( http_hdr, "Connection: closed"); if( http_build_request( http_hdr )==NULL ) { -- cgit v1.2.3