Skip to content

Commit

Permalink
Merge pull request #15 from alexmbird/master
Browse files Browse the repository at this point in the history
Add Default for Accept: Header
  • Loading branch information
claws committed Apr 25, 2018
2 parents d6e15e0 + ecceafb commit cf404b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Byte-compiled / optimized / DLL files
ga# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
Expand Down Expand Up @@ -93,3 +93,6 @@ ENV/

# vscode
.vscode/

# sublimttext
/*.sublime-*
2 changes: 1 addition & 1 deletion src/aioprometheus/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def accepts(self,
request: aiohttp.web.Request) -> Set[str]:
''' Return a sequence of accepts items in the request headers '''
accepts = set() # type: Set[str]
accept_headers = request.headers.getall(ACCEPT)
accept_headers = request.headers.getall(ACCEPT, [])
logger.debug('accept: {}'.format(accept_headers))
for accept_items in accept_headers:
if ';' in accept_items:
Expand Down

0 comments on commit cf404b0

Please sign in to comment.