mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refactor HttpResponseWriter.write, default to single text mode.
This commit is contained in:
parent
8cdb7cc727
commit
d9842b0371
6 changed files with 96 additions and 24 deletions
|
@ -647,6 +647,10 @@ srs_error_t SrsHttpResponseWriter::write(char* data, int size)
|
|||
|
||||
// write the header data in memory.
|
||||
if (!header_wrote) {
|
||||
if (hdr->content_type().empty()) {
|
||||
hdr->set_content_type("text/plain; charset=utf-8");
|
||||
}
|
||||
hdr->set_content_length(size);
|
||||
write_header(SRS_CONSTS_HTTP_OK);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue