Repository navigation
Commit 67bc972
committed
Make the deeply nested body test independent of stack size
The test posted a well-formed 100,000-deep JSON array and asserted
PARSE_ERROR, which only holds where json.loads hits its recursion guard.
On CPython 3.14 with a large enough C stack the body parses, the server
correctly answers INVALID_REQUEST, and the assertion fails.
Leave the body unterminated so it is unparseable on every interpreter:
RecursionError where the guard trips, JSONDecodeError where the scanner
reaches the end of input. The server maps both to 400 + PARSE_ERROR.
Fixes #31461 parent d639cf7 commit 67bc972
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1139 | 1139 | | |
1140 | 1140 | | |
1141 | 1141 | | |
1142 | | - | |
1143 | | - | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
1144 | 1145 | | |
1145 | 1146 | | |
1146 | 1147 | | |
| |||
0 commit comments