Parameters are not JSON-encoded in HTTP requests generated by launchpadlib

Bug #305134 reported by Abel Deuring
2
Affects Status Importance Assigned to Milestone
launchpadlib
New
Undecided
Unassigned

Bug Description

The calls

  Launchpadlib(...).hwdb.devices(name='null')
  Launchpadlib(...).hwdb.devices(name=None)

result in identical queries:

  https:<hostname>/+hwdb?ws.op=drivers&name=null

The server interprets this as name=None , which is correct for the first client call, but obviously wrong for the second call.

The call devices(name='null') should generate a query like "...name=%22null%22"

Calls like method(parameter='true') or method(parameter='false') result in a similar problem: The server interprets this as parameter=True resp. parameter=False.

Revision history for this message
Abel Deuring (adeuring) wrote : Re: [Bug 305134] [NEW] Parameters are not JSON-encoded in HTTP requests generated by launchpadlib

Abel Deuring schrieb:
> Public bug reported:
>
> The calls
>
> Launchpadlib(...).hwdb.devices(name='null')
> Launchpadlib(...).hwdb.devices(name=None)
>
> result in identical queries:
>
> https:<hostname>/+hwdb?ws.op=drivers&name=null
>
> The server interprets this as name=None , which is correct for the first
> client call, but obviously wrong for the second call.

sigh, that should have been:

which is correct for the _second_ client call, but obviously wrong for
the _first_ call.

>
> The call devices(name='null') should generate a query like
> "...name=%22null%22"
>
> Calls like method(parameter='true') or method(parameter='false') result
> in a similar problem: The server interprets this as parameter=True resp.
> parameter=False.
>
> ** Affects: launchpadlib
> Importance: Undecided
> Status: New
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.