-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for JSON-RPC 1.x and tweak some error messages #6
Conversation
// Check the validity of the request accoarding to RFC | ||
if(!isset($request->jsonrpc) || $request->jsonrpc !== '2.0') { | ||
// Check that it's a valid 1.0 or 2.0 request | ||
if(!$this->request_version) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will fail for valid 1.0 requests as those do not contain the jsonrpc attribute: http://json-rpc.org/wiki/specification#a1.1Requestmethodinvocation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This checks for the version of the request. set_version() checks for a couple of things and stores whether it's a 1.1 request or a 2.0 request and stores that number in $this->request_version.
Version 1.1 requests (in the libaries I've seen) send a "version" string instead of JSONRPC.
I'm closing this pull request for now. I've made some substantial changes to the code, so the pull request is a pretty massive change at this point. I'd be happy to discuss the changes I made and collaborate in the future if you're interested. |
Provide method for setting the level of error reporting
HI, sorry, we've been finishing a project these past two weeks and there was zero time to respond to anything.. I've reopened the issue & granted you write permissions to manage the sourcecode if you're interested. I will continue with merging the pull request tommorow + doing some tweaks if need be. Overall however, since you're using the library actively (I'm not at this very moment), it would be best just to update the repo directly if you're missing a function. Thanks! |
On 02/14/2014 08:25 AM, Pavel Ptacek wrote:
I made some pretty substantial changes to the code. I didn't want to
|
I was going to push all my changes in to your repo this morning but I got a huge merge conflict. All my code is tab indented, and yours is space indented. Should I convert it back to spaces before I push? |
Hi, Thanks, On Thu, Feb 20, 2014 at 5:09 PM, Scott Baker notifications@github.comwrote:
|
We detect a version 1.0 client and then tailor our response to be 1.0 appropriate.
No description provided.