rpc: Use application/json MIME type instead of text/json.

This commit is contained in:
Sam Edwards 2014-05-15 15:17:22 -06:00
parent d508e029b8
commit 665d70548d
2 changed files with 3 additions and 3 deletions

View file

@ -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):

View file

@ -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):