live: explicitely reply with http 200 (#57428)

`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`
This commit is contained in:
sh0rez 2022-10-25 11:45:54 +02:00 committed by GitHub
parent 588e64d9f5
commit beaaabd770
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}