Skip to content

Commit

Permalink
Fix unquoting, picked from #165
Browse files Browse the repository at this point in the history
- use yarl public api to unquote
- update travis env to use latest aiohttp compatible version(2.3.9)
  • Loading branch information
lucasts authored and samuelcolvin committed Jan 18, 2018
1 parent 25d8025 commit adafb65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aiohttp_devtools/runserver/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from aiohttp.web import FileResponse, Response
from aiohttp.web_exceptions import HTTPNotFound, HTTPNotModified
from aiohttp.web_urldispatcher import StaticResource
from yarl import unquote
from yarl import URL

from ..exceptions import AiohttpDevException
from ..logs import rs_aux_logger as aux_logger
Expand Down Expand Up @@ -294,7 +294,7 @@ def modify_request(self, request):
"""
Apply common path conventions eg. / > /index.html, /foobar > /foobar.html
"""
filename = unquote(request.match_info['filename'])
filename = URL.build(path=request.match_info['filename'], encoded=True).path
raw_path = self._directory.joinpath(filename)
try:
filepath = raw_path.resolve()
Expand Down

0 comments on commit adafb65

Please sign in to comment.