lib/knj/web.rb in knjrbfw-0.0.39 vs lib/knj/web.rb in knjrbfw-0.0.40
- old
+ new
@@ -1,8 +1,8 @@
class Knj::Web
#Parses URI and returns hash with data.
def self.parse_uri(str)
- uri_match = str.to_s.match(/^\/(.+?\..+?|)(\?(.+)|)$/)
+ uri_match = str.to_s.match(/^\/(.+?\..*?|)(\?(.*)|)$/)
raise "Could not parse the URI: '#{str}'." if !uri_match
return {
:path => "/#{uri_match[1]}",
:query => uri_match[3]
\ No newline at end of file