Commit c20bca6
Lionel Schiepers
Don't set the content-type when there is no payload
The HTTP Get operation actually set a content-type of 'application/json' when there is no payload. The request adds a content-length of 0 because there is no payload.
Web server like https://github.com/stoplightio/prism (mock of openapi) reject the calls because the content-type has nothing to do with GET operations.
Exemple:
GET http://127.0.0.1:4010/RESTMethod HTTP/1.1
content-type: application/json
accept: application/json
host: 127.0.0.1:4010
content-length: 0
Connection: close1 parent 0c12ebf commit c20bca6
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
453 | 457 | | |
454 | 458 | | |
455 | 459 | | |
| |||
0 commit comments