Commit 61a9d05
Fix crash when HttpResponseDecoder receives non-JSON response
Add validation before JSON parsing in processBody to prevent crashes
when receiving non-JSON HTTP responses (e.g., HTML from captive portals).
Uses nlohmann::json::accept() to validate response body before parsing.
Fixes #1338
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 97f7f8f commit 61a9d05
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
176 | 184 | | |
177 | 185 | | |
178 | 186 | | |
| |||
0 commit comments