libavformat/http: add support for content_type option in listen mode

Instead of silently ignoring the content_type option in listen mode,
apply its value to the provided "Content-Type:" header.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Moritz Barsnick 2016-08-10 21:18:00 +02:00 committed by Michael Niedermayer
parent ec4ed2f69c
commit d14993478c
2 changed files with 2 additions and 2 deletions

View file

@ -355,7 +355,7 @@ static int http_write_reply(URLContext* h, int status_code)
case 200:
reply_code = 200;
reply_text = "OK";
content_type = "application/octet-stream";
content_type = s->content_type ? s->content_type : "application/octet-stream";
break;
case AVERROR_HTTP_SERVER_ERROR:
case 500: