Mercurial > hg
comparison tests/phabricator/phab-conduit.json @ 41017:d7d3164e6a31 stable
phabricator: properly encode boolean types in the request body
I tripped over this playing with `hg debugcallconduit` to query for valid
reviewers. If the JSON on stdin is written as 'True' or 'False', python
complains it isn't valid JSON. If it's written as 'true' or 'false', it made it
to the server, but got kicked back with this:
abort: Conduit Error (ERR-CONDUIT-CORE): Error while reading "isBot":
Expected boolean (true or false), got something else.
The test isn't really relevant here (the code can be reverted, and it will
pass), but this gives us coverage for the debug command.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 21 Dec 2018 17:36:12 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
40988:03f7d0822ec1 | 41017:d7d3164e6a31 |
---|---|
1 { | |
2 "interactions": [ | |
3 { | |
4 "response": { | |
5 "status": { | |
6 "message": "OK", | |
7 "code": 200 | |
8 }, | |
9 "headers": { | |
10 "content-type": [ | |
11 "application/json" | |
12 ], | |
13 "date": [ | |
14 "Fri, 21 Dec 2018 22:19:11 GMT" | |
15 ], | |
16 "x-content-type-options": [ | |
17 "nosniff" | |
18 ], | |
19 "cache-control": [ | |
20 "no-store" | |
21 ], | |
22 "strict-transport-security": [ | |
23 "max-age=0; includeSubdomains; preload" | |
24 ], | |
25 "x-frame-options": [ | |
26 "Deny" | |
27 ], | |
28 "set-cookie": [ | |
29 "phsid=A%2Fdv22bpksbdis3vfeksluagfslhfojblbnkro7we4; expires=Wed, 20-Dec-2023 22:19:11 GMT; Max-Age=157680000; path=/; domain=phab.mercurial-scm.org; secure; httponly" | |
30 ], | |
31 "x-xss-protection": [ | |
32 "1; mode=block" | |
33 ], | |
34 "expires": [ | |
35 "Sat, 01 Jan 2000 00:00:00 GMT" | |
36 ], | |
37 "transfer-encoding": [ | |
38 "chunked" | |
39 ], | |
40 "server": [ | |
41 "Apache/2.4.10 (Debian)" | |
42 ] | |
43 }, | |
44 "body": { | |
45 "string": "{\"result\":{\"data\":[],\"maps\":{},\"query\":{\"queryKey\":null},\"cursor\":{\"limit\":100,\"after\":null,\"before\":null,\"order\":null}},\"error_code\":null,\"error_info\":null}" | |
46 } | |
47 }, | |
48 "request": { | |
49 "method": "POST", | |
50 "headers": { | |
51 "accept": [ | |
52 "application/mercurial-0.1" | |
53 ], | |
54 "content-type": [ | |
55 "application/x-www-form-urlencoded" | |
56 ], | |
57 "content-length": [ | |
58 "70" | |
59 ], | |
60 "host": [ | |
61 "phab.mercurial-scm.org" | |
62 ], | |
63 "user-agent": [ | |
64 "mercurial/proto-1.0 (Mercurial 4.8.1+564-6f483b107eb5+20181221)" | |
65 ] | |
66 }, | |
67 "uri": "https://phab.mercurial-scm.org//api/user.search", | |
68 "body": "constraints%5BisBot%5D=true&api.token=cli-hahayouwish" | |
69 } | |
70 } | |
71 ], | |
72 "version": 1 | |
73 } |