fasthttp-routing
fasthttp-routing copied to clipboard
fasthttp-routing not writing user set headers on user handler error
As I pointed here the fasthttp-routing uses builtin Error()
function of fasthttp.RequestCtx
in it's handler (file report.go
lines 103
and 105
). This function however completely resets response which introduces problem e.g. when returning error 401 (it should return header WWW-Authenticate
in response and resetting response deletes all headers). Would it be possible to implement custom error handling function which would correctly print all user-set headers in response on error encounter?
I have created a pull request to fix this issue.