Fix issue #11 in the pecan adapter
This commit is contained in:
parent
8b235ef79a
commit
f9fe028eff
@ -126,4 +126,4 @@ class TestWS(FunctionalTest):
|
||||
|
||||
def test_no_content_type_if_no_return_type(self):
|
||||
res = self.app.delete('/authors/4')
|
||||
assert "Content-Type" not in res.headers
|
||||
assert "Content-Type" not in res.headers, res.headers['Content-Type']
|
||||
|
@ -86,6 +86,11 @@ def wsexpose(*args, **kwargs):
|
||||
pecan.response.status = 500
|
||||
return data
|
||||
|
||||
if funcdef.return_type is None:
|
||||
pecan.request.pecan['content_type'] = None
|
||||
pecan.response.content_type = None
|
||||
return ''
|
||||
|
||||
return dict(
|
||||
datatype=funcdef.return_type,
|
||||
result=result
|
||||
|
Loading…
x
Reference in New Issue
Block a user