Skip to content

Commit

Permalink
refactor(web): disconnect client by header
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaojiuwo1993 committed Nov 2, 2023
1 parent 32c5b3f commit 188b7e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Libraries/Core/src/Network/Http/Server/HttpConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@ public void Send(byte[] response)
Context.Response.StatusCode = (int)HttpStatusCode.OK;
Context.Response.ContentType = "application/xml?";
Context.Response.OutputStream.Write(response);
if (Context.Request.Headers["Connection"] == "close")
{
Context.Response.Close();
}
}
}

0 comments on commit 188b7e1

Please sign in to comment.