summaryrefslogtreecommitdiffstats
path: root/stream/network.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-05-02 00:46:03 +0300
committerUoti Urpala <uau@mplayer2.org>2011-05-02 00:46:03 +0300
commit7e65428712beacd416dc3410c52f22ebfd3b4c53 (patch)
tree79bb2f4388be7031b5505c7745e1a59aff6cff56 /stream/network.c
parent5c4b059f1608f6d6a981b7d81a14f1c46e40ba52 (diff)
parentd0376729d171a6c0b4cc15928c168f68adefbaa6 (diff)
downloadmpv-7e65428712beacd416dc3410c52f22ebfd3b4c53.tar.bz2
mpv-7e65428712beacd416dc3410c52f22ebfd3b4c53.tar.xz
Merge branch 'mplayer1_changes'
Diffstat (limited to 'stream/network.c')
-rw-r--r--stream/network.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/stream/network.c b/stream/network.c
index c6776ac29a..b722023061 100644
--- a/stream/network.c
+++ b/stream/network.c
@@ -58,6 +58,7 @@ int network_bandwidth=0;
int network_cookies_enabled = 0;
char *network_useragent=NULL;
char *network_referrer=NULL;
+char **network_http_header_fields=NULL;
/* IPv6 options */
int network_ipv4_only_proxy = 0;
@@ -250,6 +251,12 @@ http_send_request( URL_t *url, off_t pos ) {
if (network_cookies_enabled) cookies_set( http_hdr, server_url->hostname, server_url->url );
+ if (network_http_header_fields) {
+ int i=0;
+ while (network_http_header_fields[i])
+ http_set_field(http_hdr, network_http_header_fields[i++]);
+ }
+
http_set_field( http_hdr, "Connection: close");
if (proxy)
http_add_basic_proxy_authentication(http_hdr, url->username, url->password);