[PATCH 05/10] REST: Handle regular form data requests for checks

Stephen Finucane stephen at that.guru
Wed May 1 03:50:29 AEST 2019


On Tue, 2019-04-30 at 16:03 +1000, Daniel Axtens wrote:
> 08d1459a4a40 ("Add REST API validation using OpenAPI schema") moved
> all API requests to JSON blobs rather than form data.
> 
> dc48fbce99ef ("REST: Handle JSON requests") attempted to change the
> check serialiser to handle this. However, because both a JSON dict
> and a QueryDict satisfy isinstance(data, dict), everything was handled
> as JSON and the old style requests were broken.
> 
> Found in the process of debugging issues from the OzLabs PW & Snowpatch
> crew - I'm not sure if they actually hit this one, but kudos to them
> anyway as we wouldn't have found it without them.
> 
> Fixes: dc48fbce99ef ("REST: Handle JSON requests")
> (backported from commit 666de29ebada5990a8d69f4d71d6bb271e1a68c3
>  This does not need the new tests as we do not have 08d1459a4a40, so we
>  just need the fix to the api. We do not add a JSON test to stable.)
> Signed-off-by: Daniel Axtens <dja at axtens.net>

Applied.




More information about the Patchwork mailing list