mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge 75118a608f into merged_master (Bitcoin PR bitcoin/bitcoin#27101)
This commit is contained in:
commit
c3eebcf145
13 changed files with 349 additions and 95 deletions
|
|
@ -160,6 +160,15 @@ class AuthServiceProxy():
|
|||
raise JSONRPCException({
|
||||
'code': -342, 'message': 'missing HTTP response from server'})
|
||||
|
||||
# Check for no-content HTTP status code, which can be returned when an
|
||||
# RPC client requests a JSON-RPC 2.0 "notification" with no response.
|
||||
# Currently this is only possible if clients call the _request() method
|
||||
# directly to send a raw request.
|
||||
if http_response.status == HTTPStatus.NO_CONTENT:
|
||||
if len(http_response.read()) != 0:
|
||||
raise JSONRPCException({'code': -342, 'message': 'Content received with NO CONTENT status code'})
|
||||
return None, http_response.status
|
||||
|
||||
content_type = http_response.getheader('Content-Type')
|
||||
if content_type != 'application/json':
|
||||
raise JSONRPCException(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue