mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Merge pull request #68 from f/master
Fix for #67, Radix tree needs path style string
This commit is contained in:
		
						commit
						23b09ff645
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -27,7 +27,7 @@ class Kemal::Handler < HTTP::Handler | |||
|   def process_request(context) | ||||
|     url = context.request.path.not_nil! | ||||
|     Kemal::Route.check_for_method_override!(context.request) | ||||
|     lookup = @tree.find radix_path(context.request.override_method, context.request.path) | ||||
|     lookup = @tree.find radix_path(context.request.override_method as String, context.request.path) | ||||
|     if lookup.found? | ||||
|       route = lookup.payload as Route | ||||
|       if route.match?(context.request) | ||||
|  | @ -46,8 +46,8 @@ class Kemal::Handler < HTTP::Handler | |||
|     return render_404(context) | ||||
|   end | ||||
| 
 | ||||
|   private def radix_path(method, path) | ||||
|     "#{method} #{path}" | ||||
|   private def radix_path(method : String, path) | ||||
|     "/#{method.downcase}#{path}" | ||||
|   end | ||||
| 
 | ||||
|   private def add_to_radix_tree(method, path, route) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue