Skip to content

Commit

Permalink
Some more problems with any
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Vanhoren committed Jun 16, 2013
1 parent 1d102e7 commit 540a5b6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bottle.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,11 @@ def match(self, environ):
method = environ['REQUEST_METHOD'].upper()

path, targets, urlargs = environ['PATH_INFO'] or '/', None, {}

static = self.static[method] if method in self.static else self.static['ANY']
if path in static:

if method in self.static and path in self.static[method]:
targets = self.static[method][path]
elif path in self.static['ANY']:
targets = self.static['ANY'][path]
else:
dyna_regex = self.dyna_regexes[method] if method in self.dyna_regexes else self.dyna_regexes['ANY']
combined, rules = dyna_regex
Expand Down

0 comments on commit 540a5b6

Please sign in to comment.