diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-04-07 15:21:01 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-04-07 15:40:17 +0200 |
| commit | 5078ca45438e8f8d8e7cd937659887fb8ec70038 (patch) | |
| tree | 44f199b8d7c74f8d5097a80e7de09aff8ad2b719 /src/test/script_P2SH_tests.cpp | |
| parent | Merge #7832: Reduce block timeout to 10 minutes (diff) | |
| download | discoin-5078ca45438e8f8d8e7cd937659887fb8ec70038.tar.xz discoin-5078ca45438e8f8d8e7cd937659887fb8ec70038.zip | |
tests: Check Content-Type header returned from RPC server
Check the Content-Type header that is returned from the RPC server. Only
if it is `application/json` the data is supposed to be parsed as JSON.
This gives better reporting if the HTTP server happens to return an error that is
not JSON-formatted, which is the case if it happens at a lower level
before JSON-RPC kicks in.
Before: `Unexpected exception caught during testing: No JSON object could be decoded`
After: `JSONRPC error: non-JSON HTTP response with '403 Forbidden' from server`
Diffstat (limited to 'src/test/script_P2SH_tests.cpp')
0 files changed, 0 insertions, 0 deletions