Commit 1856607
committed
Fix: Ensure Content-Type header is set consistently for JSON data regardless of header count
This fixes issue #1834 where Content-Type header was not being set when sending JSON data with only one custom header, but was properly set when multiple headers were present.
The fix modifies the make_default_headers function to always set Content-Type when JSON data is present, regardless of whether the --json flag is explicitly used or if there are multiple headers.1 parent 5b604c3 commit 1856607
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
272 | 274 | | |
273 | 275 | | |
274 | 276 | | |
| |||
397 | 399 | | |
398 | 400 | | |
399 | 401 | | |
400 | | - | |
| 402 | + | |
0 commit comments