katzer / mruby-shelf

Modular webserver interface for mruby
MIT License
25 stars 5 forks source link

Search action using method argument #3

Closed genya0407 closed 1 year ago

genya0407 commented 2 years ago

If we define two actions with the same path but a different method, requests pointing to the path result in unintuitive behavior:

This is because, in dispatching requests, Shelf's current implementation does not pass method to R3::Tree#match.

In order to fix this issue, I modified Dispatcher to use method in addition to path to match @tree.

genya0407 commented 2 years ago

@katzer Thank you for reviewing my PR, and sorry for my late reply! I fixed the pointed problems. Could you check it?