Remove request body from response header

Having 'body' in the pecan RequestViewerHook causes all responses to
contain posted json data in their headers. So when we were trying to use
refstack-client to upload results from a full test run, it would raise
an exception like:

Error "httplib.LineTooLong: got more than 65536 bytes when reading header line"

This is because the API is sending back our posted json data (150kB) back in
the response header under the key "x-pecan-body". This commit stops pecan from
adding the request body to the response header.

Change-Id: Ieab0bc8df86ba85a9f2f5382fb5ae7f054214afb
This commit is contained in:
Paul Van Eck 2015-01-21 16:28:46 -08:00
parent 199585253e
commit d0d108f891

View File

@ -85,7 +85,7 @@ def setup_app(config):
app_conf.pop('root'),
logging=getattr(config, 'logging', {}),
hooks=[JSONErrorHook(app_conf), hooks.RequestViewerHook(
{'items': ['status', 'method', 'controller', 'path', 'body']}
{'items': ['status', 'method', 'controller', 'path']}
), BackendHook(app_conf)],
**app_conf
)