From 1ca81288bfe80df52c3f4d1d2012bb74da5f71b9 Mon Sep 17 00:00:00 2001
From: Bart Nagel <bart@tremby.net>
Date: Fri, 12 Aug 2011 21:38:41 +0100
Subject: [PATCH] Send an HTTP Accept header
When streaming over HTTP, specify with the request that we prefer audio and
video mimetypes, then application mimetypes (the official mimetype for Ogg
streams, for instance, is application/ogg), then anything else.
---
stream/network.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/stream/network.c b/stream/network.c
index cebb85c..fbbd525 100644
|
a
|
b
|
http_send_request( URL_t *url, off_t pos ) {
|
| 219 | 219 | snprintf(str, sizeof(str), "User-Agent: %s", mplayer_version); |
| 220 | 220 | http_set_field(http_hdr, str); |
| 221 | 221 | |
| | 222 | snprintf(str, sizeof(str), "Accept: video/*, audio/*, application/*;q=0.9, */*;q=0.5"); |
| | 223 | http_set_field(http_hdr, str); |
| | 224 | |
| 222 | 225 | if (network_referrer) { |
| 223 | 226 | char *referrer = NULL; |
| 224 | 227 | size_t len = strlen(network_referrer) + 10; |