diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-12-08 13:25:35 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-12-08 13:25:35 +0000 |
commit | 28a127d80bb6363d47a3212409f05b5b0b687240 (patch) | |
tree | 46dc72427d04a496ef72aee67c230f4f59f57406 /libmpdemux/network.c | |
parent | 0f7a779f7e2d3f2ce73aec91102e6a192b052176 (diff) | |
download | mpv-28a127d80bb6363d47a3212409f05b5b0b687240.tar.bz2 mpv-28a127d80bb6363d47a3212409f05b5b0b687240.tar.xz |
Send HTTP Cookies (reading from mozilla/netscape files) support by Dave Lambley <mplayer-dev-eng@dlambley.freeserve.co.uk>. Disabled by default.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11584 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/network.c')
-rw-r--r-- | libmpdemux/network.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libmpdemux/network.c b/libmpdemux/network.c index c074628745..d31c891870 100644 --- a/libmpdemux/network.c +++ b/libmpdemux/network.c @@ -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 @@ extern int mp_input_check_interrupt(int time); 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 @@ http_send_request( URL_t *url ) { } 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 ) { |