Mercurial > mplayer.hg
diff libmpdemux/network.c @ 11583:2af52902e7dc
Send HTTP Cookies (reading from mozilla/netscape files) support by Dave Lambley <mplayer-dev-eng@dlambley.freeserve.co.uk>. Disabled by default.
author | alex |
---|---|
date | Mon, 08 Dec 2003 13:25:35 +0000 |
parents | 8de9dba0ffaa |
children | 3d75bcc28231 |
line wrap: on
line diff
--- a/libmpdemux/network.c Mon Dec 08 13:11:52 2003 +0000 +++ b/libmpdemux/network.c Mon Dec 08 13:25:35 2003 +0000 @@ -29,6 +29,7 @@ #include "network.h" #include "http.h" +#include "cookies.h" #include "url.h" #include "asf.h" #ifndef STREAMING_LIVE_DOT_COM @@ -47,11 +48,13 @@ int asf_streaming_start( stream_t *stream, int *demuxer_type ); int rtsp_streaming_start( stream_t *stream ); -/* Variables for the command line option -user, -passwd, -bandwidth - and -user-agent */ +/* Variables for the command line option -user, -passwd, -bandwidth, + -user-agent and -nocookies */ + char *network_username=NULL; char *network_password=NULL; int network_bandwidth=0; +int network_cookies_enabled = 0; char *network_useragent=NULL; /* IPv6 options */ @@ -452,6 +455,9 @@ } else http_set_field( http_hdr, "User-Agent: MPlayer/"VERSION); + + if (network_cookies_enabled) cookies_set( http_hdr, server_url->hostname, server_url->url ); + http_set_field( http_hdr, "Connection: closed"); http_add_basic_authentication( http_hdr, url->username, url->password ); if( http_build_request( http_hdr )==NULL ) {