You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of #4429, we're aggressively removing request content-type header when request body is empty.
This is wrong, some content-types have valid empty string value, such as application/x-www-form-urlencoded.
Let's only not add a request content-type when using asJson and asXml when there's no body as an empty string is not a valid content for these encodings.
The text was updated successfully, but these errors were encountered:
… body is empty, close#4509
Motivation:
As of #4429, we're aggressively removing request content-type header when request body is empty.
This is wrong, some content-types have valid empty string value, such as application/x-www-form-urlencoded.
Let's only not add a request content-type when using asJson and asXml when there's no body as an empty string is not a valid content for these encodings.
Modification:
Introduce HeadersBuiltIn that's only resolved when building the request.
… body is empty, close#4509
Motivation:
As of #4429, we're aggressively removing request content-type header when request body is empty.
This is wrong, some content-types have valid empty string value, such as application/x-www-form-urlencoded.
Let's only not add a request content-type when using asJson and asXml when there's no body as an empty string is not a valid content for these encodings.
Modification:
Introduce HeadersBuiltIn that's only resolved when building the request.
slandelle
changed the title
HTTP: revert aggressively removing requst content-type header when request body is empty
HTTP: revert aggressively removing request content-type header when request body is empty
Feb 15, 2024
As of #4429, we're aggressively removing request content-type header when request body is empty.
This is wrong, some content-types have valid empty string value, such as
application/x-www-form-urlencoded
.Let's only not add a request content-type when using
asJson
andasXml
when there's no body as an empty string is not a valid content for these encodings.The text was updated successfully, but these errors were encountered: