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
It is possible to override Content-Type or Accept headers no matter how I write the headers because they are case-insensitive.
Actual Behavior
Because the "content-type" and "accept" are written in lowercase and are the keys of an object, it is possible to provide the same headers with a different case. This leads to a behavior when the Content-Type header has a value comma in the value, and that breaks some serves because it is against the specification.
How to reproduce
Create an instance of ajax
Call on it fetchJson('/any-url', { headers: { 'Content-Type': 'json' } });
Check the "Content-Type" header in the resulting request. It will have comma in the value
Additional context
@lion/ajax v1.3.0
The text was updated successfully, but these errors were encountered:
Expected behavior
It is possible to override Content-Type or Accept headers no matter how I write the headers because they are case-insensitive.
Actual Behavior
Because the "content-type" and "accept" are written in lowercase and are the keys of an object, it is possible to provide the same headers with a different case. This leads to a behavior when the Content-Type header has a value comma in the value, and that breaks some serves because it is against the specification.
How to reproduce
Additional context
@lion/ajax v1.3.0
The text was updated successfully, but these errors were encountered: