mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 17:32:06 +00:00
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:
parent
ec4ed2f69c
commit
d14993478c
@ -276,7 +276,7 @@ value is -1.
|
|||||||
If set to 1 use chunked Transfer-Encoding for posts, default is 1.
|
If set to 1 use chunked Transfer-Encoding for posts, default is 1.
|
||||||
|
|
||||||
@item content_type
|
@item content_type
|
||||||
Set a specific content type for the POST messages.
|
Set a specific content type for the POST messages or for listen mode.
|
||||||
|
|
||||||
@item http_proxy
|
@item http_proxy
|
||||||
set HTTP proxy to tunnel through e.g. http://example.com:1234
|
set HTTP proxy to tunnel through e.g. http://example.com:1234
|
||||||
|
@ -355,7 +355,7 @@ static int http_write_reply(URLContext* h, int status_code)
|
|||||||
case 200:
|
case 200:
|
||||||
reply_code = 200;
|
reply_code = 200;
|
||||||
reply_text = "OK";
|
reply_text = "OK";
|
||||||
content_type = "application/octet-stream";
|
content_type = s->content_type ? s->content_type : "application/octet-stream";
|
||||||
break;
|
break;
|
||||||
case AVERROR_HTTP_SERVER_ERROR:
|
case AVERROR_HTTP_SERVER_ERROR:
|
||||||
case 500:
|
case 500:
|
||||||
|
Loading…
Reference in New Issue
Block a user