cenobites / flask-jsonrpc

Basic JSON-RPC implementation for your Flask-powered sites

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect ID returned in responses.

robinvanleeuwen opened this issue · comments

HI, when trying out the live demo, i see that the jsonrpc-id in the response differs from the jsonrpc-id given in the request:

Request:

POST /api
{
  "jsonrpc": "2.0",
  "method": "App.greeting",
  "params": {
    "name": "Banana"
  },
  "id": "84e0e077-028e-447e-be83-bf8c607bd540"
}

and:

Response:

HTTP 200
{
  "id": "5717625d-a170-4394-bbf8-b39564b2af1d",
  "jsonrpc": "2.0",
  "result": "Hello Banana"
}

But the JSON RPC Specification ( https://www.jsonrpc.org/specification ) in point "5 Response object" states:

id
    This member is REQUIRED.  
    It MUST be the same as the value of the id member in the Request Object.  
    If there was an error in detecting the id in the   
    Request object (e.g. Parse error/Invalid Request), it MUST be Null. 

Am i misinterpreting something here, or is the response value of the ID indeed incorrect?

Hi,

This bug was reported by #84 and fixed by #85.
I will create new release as soon as possible, please use master branch in this time.

Thank you.