Merge pull request #27 from dave-shawley/backport-26

Backport #26
This commit is contained in:
dave-shawley 2020-05-04 17:09:56 -04:00 committed by GitHub
commit 5495cb3228
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 4 deletions

View file

@ -1,4 +1,4 @@
Copyright (c) 2015-2016 AWeber Communications
Copyright (c) 2015-2020 AWeber Communications
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,

View file

@ -9,7 +9,7 @@ extensions = ['sphinx.ext.autodoc',
source_suffix = '.rst'
master_doc = 'index'
project = 'sprockets.mixins.mediatype'
copyright = '2015-2016, AWeber Communications'
copyright = '2015-2020, AWeber Communications'
release = __version__
version = '.'.join(release.split('.')[0:1])

View file

@ -1,6 +1,11 @@
Version History
===============
`2.2.3`_ (4 May 2020)
---------------------
- Do not print tracebacks when failing to parse request body.
This is a backport of https://github.com/sprockets/sprockets.mixins.mediatype/pull/26
`2.2.2`_ (7 Apr 2018)
---------------------
- Add support for Python 3.5 throug 3.7

View file

@ -23,7 +23,7 @@ except ImportError as error: # pragma no cover
set_default_content_type = _error_closure
version_info = (2, 2, 2)
version_info = (2, 2, 3)
__version__ = '.'.join(str(v) for v in version_info)
__all__ = ['ContentMixin', 'ContentSettings', 'add_binary_content_type',
'add_text_content_type', 'set_default_content_type',

View file

@ -351,7 +351,7 @@ class ContentMixin(object):
try:
self._request_body = handler.from_bytes(self.request.body)
except Exception:
self._logger.exception('failed to decode request body')
self._logger.error('failed to decode request body')
raise web.HTTPError(400, 'failed to decode request')
return self._request_body