0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-26 01:14:10 -05:00
forgejo/modules/web
zeripath 730b9a5a62
Ensure responses are context.ResponseWriters (#19843)
In order for web.Wrap to be able to detect if a response has been written
we need to wrap any non-context.ResponseWriters as a such. Otherwise
responses will be incorrectly detected as non-written to and handlers can
double run.

In the case of GZip this handler will change the response to a non-context.RW
and this failure to correctly detect response writing causes fallthrough and
a NPE.

Fix #19839

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-05-31 21:27:44 +01:00
..
middleware Refactor CSRF protection modules, make sure CSRF tokens can be up-to-date. (#19337) 2022-04-08 13:21:05 +08:00
routing Add Goroutine stack inspector to admin/monitor (#19207) 2022-03-31 19:01:43 +02:00
route.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
route_test.go Update HTTP status codes to modern codes (#18063) 2022-03-23 12:54:07 +08:00
wrap.go Refactor Router Logger (#17308) 2022-01-20 19:41:25 +08:00
wrap_convert.go Ensure responses are context.ResponseWriters (#19843) 2022-05-31 21:27:44 +01:00