fixed endpoint matching when indexing directory
This commit is contained in:
		
							parent
							
								
									bab57b00bf
								
							
						
					
					
						commit
						f1f13faddf
					
				
							
								
								
									
										5
									
								
								hyde.rb
								
								
								
								
							
							
						
						
									
										5
									
								
								hyde.rb
								
								
								
								
							|  | @ -175,8 +175,8 @@ module Hyde | |||
|     def _match?(path, request) | ||||
|       # End node - nothing must be after it | ||||
|       if super(path,request) then | ||||
|         match_path = _normalize_input(request.path).match(@path) | ||||
|         return (match_path.post_match == "")   | ||||
|         match_path = _normalize_input(path).match(@path) | ||||
|         return (match_path.post_match == "") | ||||
|       end | ||||
|     end | ||||
|   end | ||||
|  | @ -335,7 +335,6 @@ module Hyde | |||
|         # do directory indexing | ||||
|         if cut_path.match /^\/?$/ then | ||||
|           request.indexlist.each do |x| | ||||
|             puts "Trying index #{x}" | ||||
|             try_index = @chain.find { |y| y._match? x, request } | ||||
|             if try_index then | ||||
|               request.path = x | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue