1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-15 04:42:04 +00:00

HTTP: Close connection for HTTP static file server

This commit is contained in:
winlin 2020-05-26 09:53:36 +08:00
parent f501d5b63d
commit 2b50326e97

View file

@ -360,6 +360,10 @@ srs_error_t SrsHttpFileServer::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMes
{ {
srs_assert(entry); srs_assert(entry);
// For each HTTP session, we use short-term HTTP connection.
SrsHttpHeader* hdr = w->header();
hdr->set("Connection", "Close");
string upath = r->path(); string upath = r->path();
string fullpath = srs_http_fs_fullpath(dir, entry->pattern, upath); string fullpath = srs_http_fs_fullpath(dir, entry->pattern, upath);