summaryrefslogtreecommitdiffstats
path: root/libmpdemux/network.c
diff options
context:
space:
mode:
authorbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-18 18:45:00 +0000
committerbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-18 18:45:00 +0000
commit2f6396e310ee1f03df1563a3ee760654a4673607 (patch)
tree102365b1cbe30f7468121feb0c212098a7a937d9 /libmpdemux/network.c
parent1db88fbdcb0cefcd3a35741c072be44b2cb14cf8 (diff)
downloadmpv-2f6396e310ee1f03df1563a3ee760654a4673607.tar.bz2
mpv-2f6396e310ee1f03df1563a3ee760654a4673607.tar.xz
Added the Host field in the HTTP request.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3586 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/network.c')
-rw-r--r--libmpdemux/network.c3
1 files changed, 3 insertions, 0 deletions
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 ) {