trivial: strip http headers as webtest doesn't send them properly
This commit is contained in:
parent
cdf20cf8be
commit
a4f43de039
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue