alfonsodg / demo-web2py

Apache License 2.0
0 stars 0 forks source link

jsonrpc params causes exception if not transmitted #175

Closed alfonsodg closed 10 years ago

alfonsodg commented 10 years ago

From gr...@jingojango.net on February 05, 2011 01:41:33

Per JSON-RPC 2.0 spec ( https://groups.google.com/group/json-rpc/web/json-rpc-1-2-proposal )

params An Array or Object, that holds the actual parameter values for the invocation of the procedure. Can be omitted if empty.

Line 3519 of tools.py (serve_jsonrpc function):

    id, method, params = data["id"], data["method"], data["params"]

Fix:

    if data.has_key("params"):
        params = data["params"]
    else:
        params = ""

Original issue: http://code.google.com/p/web2py/issues/detail?id=177

alfonsodg commented 10 years ago

From massimo....@gmail.com on February 05, 2011 20:44:41

Status: Fixed