Commit 0d62e17
committed
Fix for non-json encoded payloads
This will make two attempts to decode the payload. If it cannot decode
the first time it will simply encode the payload then re-attempt to
decode.
While this feels like just additional overhead (why not just reply with
the original payload?) this will hopefully keep the API on the path of
using JSON responses an anticipation that the Chromium team fixes this
bug upstream. This way we don't have to introduce a bunch of forking
code to detect different payload types.1 parent d9b55bb commit 0d62e17
1 file changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
48 | 56 | | |
0 commit comments