1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

add Context.Clone and change the input argument of Context.OnClose and OnCloseConnection ( the un-released Defer has been removed, OnClose can do its job)

Former-commit-id: 7b606e285f4b9de24338ea96d482cf1f7c4907a3
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-07-02 20:31:34 +03:00
parent 2d9485326b
commit 85fc0f5dab
3 changed files with 151 additions and 121 deletions

View File

@@ -76,8 +76,7 @@ func (b *Broker) ServeHTTP(ctx iris.Context) {
flusher, ok := ctx.ResponseWriter().Flusher()
if !ok {
ctx.StatusCode(iris.StatusHTTPVersionNotSupported)
ctx.WriteString("Streaming unsupported!")
ctx.StopWithText(iris.StatusHTTPVersionNotSupported, "Streaming unsupported!")
return
}