rpc: Use application/json MIME type instead of text/json.
This commit is contained in:
parent
d508e029b8
commit
665d70548d
2 changed files with 3 additions and 3 deletions
|
@ -148,8 +148,8 @@ class RPCClient:
|
|||
def _setHeaders(self, channel):
|
||||
channel.clearExtraHeaders()
|
||||
channel.sendExtraHeader('Connection', 'Keep-Alive')
|
||||
channel.sendExtraHeader('Accept', 'text/json')
|
||||
channel.sendExtraHeader('Content-Type', 'text/json')
|
||||
channel.sendExtraHeader('Accept', 'application/json')
|
||||
channel.sendExtraHeader('Content-Type', 'application/json')
|
||||
channel.sendExtraHeader('User-Agent', 'OTP RPC client')
|
||||
|
||||
def _enqueueCall(self, call):
|
||||
|
|
|
@ -282,7 +282,7 @@ class RPCConnection(asynchat.async_chat, FSM):
|
|||
def sendJSON(self, data):
|
||||
body = json.dumps(data) + '\n'
|
||||
|
||||
self.sendResponse(body, 'text/json', 200)
|
||||
self.sendResponse(body, 'application/json', 200)
|
||||
|
||||
# Error handlers:
|
||||
def enterHTTPError(self, code):
|
||||
|
|
Loading…
Reference in a new issue