You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As in title, doing response:statusCode(404) within a handler for a custom 404 response causes the response:writeDefaultErrorMessage call at handler.lua:146 to crash the program.
Specifically, it tries to do a write when the response was already written.
This doesn't seem like a very niche requirement to me
The text was updated successfully, but these errors were encountered:
Yes, I have seen that as well. The problem is with the Handler implementation which mixes a set of different roles. To fix this however would be a breaking change.
My 2cts; the router I added in #131 should not actually be a plugin, but it should replace the Handler. It should become the entry point for any request, and it should be possible to add plugins on a per-path basis. For example;
/static -> File handler plugin, Compress plugin
/downloads -> Download plugin, Compress plugin
/api -> call-back based
etc.
But that would require breaking changes. Though would make for a great 1.0 version.
As in title, doing
response:statusCode(404)
within a handler for a custom 404 response causes theresponse:writeDefaultErrorMessage
call at handler.lua:146 to crash the program.Specifically, it tries to do a write when the response was already written.
This doesn't seem like a very niche requirement to me
The text was updated successfully, but these errors were encountered: