`pkg/web` triggers a panic when a http handler chain does not return any
response to the client.
This has been put in place, because it usually means a middleware along
the way did not call the next one.
In this specific case however, the handlers meant to return 200, but did
not do so explicitely, instead relying on the default behavior of `net/http`
(cherry picked from commit beaaabd770)
Co-authored-by: sh0rez <me@shorez.de>
This commit is contained in:
co-authored by
sh0rez
parent
68c8987152
commit
8d7c3f19ee
@@ -94,6 +94,8 @@ func (g *Gateway) Handle(ctx *models.ReqContext) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
ctx.Resp.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
||||
func (g *Gateway) HandlePipelinePush(ctx *models.ReqContext) {
|
||||
@@ -126,4 +128,6 @@ func (g *Gateway) HandlePipelinePush(ctx *models.ReqContext) {
|
||||
ctx.Resp.WriteHeader(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Resp.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user