| |
@@ -226,9 +226,9 @@
|
| |
self.tmp = tempfile.mkdtemp(dir=app.config["STORAGE_DIR"])
|
| |
log.debug("storing hook content under %s", self.tmp)
|
| |
try:
|
| |
- with open(os.path.join(self.tmp, 'hook_payload'), "w") as f:
|
| |
+ with open(os.path.join(self.tmp, 'hook_payload'), "wb") as f:
|
| |
# Do we need to dump http headers, too?
|
| |
- f.write(flask.request.data.decode(errors='replace'))
|
| |
+ f.write(flask.request.data)
|
| |
|
| |
except Exception:
|
| |
log.exception('can not store hook payload')
|
| |
It doesn't make sense to decode the string right before writing the
payload to file. Simply open the file with "b", and write raw string.
Fixes: #1577