trivial: strip http headers as webtest doesn't send them properly

This commit is contained in:
Frédéric Péters 2015-04-03 17:28:10 +02:00
parent cdf20cf8be
commit a4f43de039
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ class HTTPRequest(quixote.http_request.HTTPRequest):
self.form[k] = v.encode(self.charset)
def is_json(self):
if self.get_header('Accept') == 'application/json':
if self.get_header('Accept', '').strip() == 'application/json':
return True
if self.get_query() == 'json':
return True