Skip to content

Commit 5d51ccc

Browse files
Feature/fix issue 647 (#807)
* Add .eggs to gitignore * Improved regular expression for CORS middleware * Fix broken OSX build
1 parent 1746c3a commit 5d51ccc

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*.egg-info
99
build
1010
eggs
11+
.eggs
1112
parts
1213
var
1314
sdist

hug/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def match_route(self, reqpath):
171171
reqpath = re.sub("^(/v\d*/?)", "/", reqpath)
172172
base_url = getattr(self.api.http, "base_url", "")
173173
reqpath = reqpath.replace(base_url, "", 1) if base_url else reqpath
174-
if re.match(re.sub(r"/{[^{}]+}", r"/[\\w-]+", route) + "$", reqpath):
174+
if re.match(re.sub(r"/{[^{}]+}", ".+", route) + "$", reqpath, re.DOTALL):
175175
return route
176176

177177
return reqpath

scripts/before_install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ echo $TRAVIS_OS_NAME
1818
python_minor=5;;
1919
py36)
2020
python_minor=6;;
21+
py36-marshmallow2)
22+
python_minor=6;;
23+
py36-marshmallow3)
24+
python_minor=6;;
2125
py37)
2226
python_minor=7;;
2327
esac

0 commit comments

Comments
 (0)