tcalmant / jsonrpclib

A Python (2 & 3) JSON-RPC over HTTP that mirrors the syntax of xmlrpclib (aka jsonrpclib-pelix)
https://jsonrpclib-pelix.readthedocs.io/
Apache License 2.0
53 stars 24 forks source link

Seems lack of handling for query string on version 0.4.2 when used as a client #51

Closed greggzj closed 2 years ago

greggzj commented 2 years ago

Hello, just a little confusing, when using version 0.4.0 as a client with query string (e.g: 'http://192.168.1.3/XXX?auth=12345') its all okay when sending jsonrpc request.. But when updating to version 0.4.2, the query string (?auth=12345) is been abandoned before sending the request....

Glancing at code, seems lack of handling query property after calling urlparse ?

https://github.com/tcalmant/jsonrpclib/blob/7b3659d2ae373b4f63af81f371494fd3c0e4b74b/jsonrpclib/jsonrpc.py#L631

Hoping for your feedback, thanks a lot!

tcalmant commented 2 years ago

Hi,

Indeed, this seems like a bug that came in when the URL handling was refactored. I'll fix it ASAP by keeping the query string in some place, and let you try the prototype

greggzj commented 2 years ago

Hi,

Indeed, this seems like a bug that came in when the URL handling was refactored. I'll fix it ASAP by keeping the query string in some place, and let you try the prototype

Thanks for your quick response Thomas, hoping for the new release!

tcalmant commented 2 years ago

The last push on master should work, I'll let you try it.

I'll make try another change in the JSON library loading process before releasing 0.4.3.

tcalmant commented 2 years ago

Closing as issue is fixed in release 0.4.3. I've added a test to avoid this issue to come up again.