Various fixes in _mexe: #1114

Open
wants to merge 1 commit into
from

Projects

None yet

1 participant

@wvmarle
wvmarle commented Nov 14, 2012

Logging the http request body: if the body is >1024 bytes, only the first 1024 bytes are logged, together with the total size of the body. This to prevent logging MB or even GB sized bodies like when uploading files. The first 1024 bytes should be enough to see whether the body is as expected.

Log e instead of e.class.name when an error is encountered, to have an actual error name (e.class.name results in 'error' which is not exactly useful).

If the request.body is a file-like object (e.g. an mmapped file), the seek pointer must be reset to 0 before retrying. Otherwise this gives problems calculating the hash for the authentication signature.

@wvmarle wvmarle Various fixes in _mexe:
Logging the http request body: if the body is >1024 bytes, only the first 1024 bytes are logged, together with the total size of the body. This to prevent logging MB or even GB sized bodies like when uploading files. The first 1024 bytes should be enough to see whether the body is as expected.

Log e instead of e.__class__.__name__ when an error is encountered, to have an actual error name (e.__class__.__name__ results in 'error' which is not exactly useful).

If the request.body is a file-like object (e.g. an mmapped file), the seek pointer must be reset to 0 before retrying. Otherwise this gives problems calculating the hash for the authentication signature.
4897974
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment