Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fasthttp-routing not writing user set headers on user handler error #7

Open
kostrahb opened this issue Oct 26, 2018 · 1 comment
Open

Comments

@kostrahb
Copy link

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?

@kostrahb
Copy link
Author

I have created a pull request to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant