mirror of
https://github.com/infinite-iroha/touka.git
synced 2026-06-13 15:47:38 +08:00
perf: modernize io paths and reduce proxy allocations
This commit is contained in:
parent
02861b5537
commit
54f7de0c60
11 changed files with 312 additions and 29 deletions
|
|
@ -154,7 +154,7 @@ func writeDefaultErrorJSON(c *Context, code int, body []byte) {
|
|||
}
|
||||
c.Writer.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||
c.Writer.WriteHeader(code)
|
||||
_, _ = c.Writer.Write(body)
|
||||
c.writeResponseBody(body, "failed to write default error response")
|
||||
c.Writer.Flush()
|
||||
c.Abort()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue