[Mplayer-cvslog] CVS: main/libmpdemux network.c,1.15,1.16

Bertrand Baudet bertrand at mplayer.dev.hu
Tue Dec 18 19:45:07 CET 2001


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv20162

Modified Files:
	network.c 
Log Message:
Added the Host field in the HTTP request.


Index: network.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/network.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- network.c	14 Dec 2001 20:45:30 -0000	1.15
+++ network.c	18 Dec 2001 18:45:00 -0000	1.16
@@ -154,9 +154,12 @@
 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 ) {




More information about the MPlayer-cvslog mailing list