Skip to content

Commit

Permalink
Change AIOHTTP_NOSENDFILE usage to be consistent with other aiohttp envs
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Nov 10, 2015
1 parent 2834235 commit 9dc529b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ CHANGES
- Enable passing pre-compressed data in requests #621

- Expose named routes via UrlDispatcher.named_routes() #622

- Allow disabling sendfile by environment variable AIOHTTP_NOSENDFILE #629
2 changes: 1 addition & 1 deletion aiohttp/web_urldispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def __init__(self, name, prefix, directory, *,
raise ValueError(
"No directory exists at '{}'".format(self._directory))

if os.environ.get("AIOHTTP_NOSENDFILE") == "1":
if bool(os.environ.get("AIOHTTP_NOSENDFILE")):
self._sendfile = self._sendfile_fallback

def match(self, path):
Expand Down

0 comments on commit 9dc529b

Please sign in to comment.