Skip to content

Commit d1342b3

Browse files
Fix: ignored status code for __kitspace requests.
- From the [docs](https://pkg.go.dev/net/http#ResponseWriter.WriteHeader): ``` If WriteHeader is not called explicitly, the first call to Write will trigger an implicit WriteHeader(http.StatusOK). ```
1 parent 8184372 commit d1342b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/kitspace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ func Kitspace(ctx *context.Context) {
6060
panic(err)
6161
}
6262

63-
ctx.Resp.Write(body)
6463
ctx.Resp.WriteHeader(resp.StatusCode)
64+
ctx.Resp.Write(body)
6565
}

0 commit comments

Comments
 (0)