Remove connection keep-alive code

This commit is contained in:
2025-02-08 12:09:09 -06:00
parent 7424c8cd8a
commit 27029586f4
2 changed files with 9 additions and 14 deletions

View File

@ -177,3 +177,12 @@ target_link_libraries(tfileserver PUBLIC tessesframework)
install(TARGETS tfileserver DESTINATION bin) install(TARGETS tfileserver DESTINATION bin)
endif() endif()
include(InstallRequiredSystemLibraries)
set(CPACK_PACKAGE_CONTACT "Mike Nolan <tesses@tesses.net>")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md")
set(CPACK_PACKAGE_VERSION_MAJOR "${TessesFramework_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${TessesFramework_VERSION_MINOR}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libmbedtls-dev (>= 2.28.8)")
include(CPack)

View File

@ -834,8 +834,6 @@ namespace Tesses::Framework::Http
void HttpServer::Process(Stream& strm, IHttpServer& server, std::string ip, uint16_t port, bool encrypted) void HttpServer::Process(Stream& strm, IHttpServer& server, std::string ip, uint16_t port, bool encrypted)
{ {
while(true)
{
BufferedStream bStrm(strm); BufferedStream bStrm(strm);
StreamReader reader(bStrm); StreamReader reader(bStrm);
ServerContext ctx(&bStrm); ServerContext ctx(&bStrm);
@ -919,19 +917,7 @@ namespace Tesses::Framework::Http
if(ctx.version != "HTTP/1.1" ) return; if(ctx.version != "HTTP/1.1" ) return;
std::string connection;
if(ctx.requestHeaders.TryGetFirst("Connection", connection))
{
if(connection != "keep-alive") return;
}
if(ctx.responseHeaders.TryGetFirst("Connection", connection))
{
if(connection != "keep-alive") return;
}
if(bStrm.EndOfStream()) return;
}
} }
WebSocketConnection::~WebSocketConnection() WebSocketConnection::~WebSocketConnection()