summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Scholz <epirat07@gmail.com>2014-11-11 02:39:39 +0100
committerAnton Khirnov <anton@khirnov.net>2014-11-15 09:14:04 +0100
commit3a6bb9735053c453f806ceab1d91124648d90aca (patch)
tree24bed2a2fe9c91f43b794029403fdc11443f0113
parent2e1704059ae8625beda2ffde847ad22c5ba416dc (diff)
downloadffmpeg-streaming-3a6bb9735053c453f806ceab1d91124648d90aca.zip
ffmpeg-streaming-3a6bb9735053c453f806ceab1d91124648d90aca.tar.gz
Icecast: Send 100-continue header if possible
This allows for proper error reporting. Only do this for non-legacy requests as only Icecast >2.4.0 will reply with a proper status. Libav seems to accept both, 100 and 200 status codes, but let's stay close to spec. Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--libavformat/icecast.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/icecast.c b/libavformat/icecast.c
index 155396f..1dc08ab 100644
--- a/libavformat/icecast.c
+++ b/libavformat/icecast.c
@@ -127,6 +127,7 @@ static int icecast_open(URLContext *h, const char *uri, int flags)
av_dict_set(&opt_dict, "auth_type", "basic", 0);
av_dict_set(&opt_dict, "headers", headers, 0);
av_dict_set(&opt_dict, "chunked_post", "0", 0);
+ av_dict_set(&opt_dict, "send_expect_100", s->legacy_icecast ? "0" : "1", 0);
if (NOT_EMPTY(s->content_type))
av_dict_set(&opt_dict, "content_type", s->content_type, 0);
if (NOT_EMPTY(s->user_agent))
OpenPOWER on IntegriCloud