Description
React Native XMLHttpRequest stores request headers and normalized response headers in ordinary objects. Valid header names that collide with Object.prototype are therefore corrupted or hidden: repeated Constructor values begin with inherited function text, __proto__ cannot be stored normally, and an absent toString response header is returned as an inherited function instead of null.
Expected behavior
All valid case-insensitive header names should be stored, combined, and retrieved as their own values without interacting with JavaScript object prototypes.
React Native Version
0.87.1 and current main
Affected Platforms
JavaScript networking - All
Description
React Native XMLHttpRequest stores request headers and normalized response headers in ordinary objects. Valid header names that collide with
Object.prototypeare therefore corrupted or hidden: repeatedConstructorvalues begin with inherited function text,__proto__cannot be stored normally, and an absenttoStringresponse header is returned as an inherited function instead ofnull.Expected behavior
All valid case-insensitive header names should be stored, combined, and retrieved as their own values without interacting with JavaScript object prototypes.
React Native Version
0.87.1 and current main
Affected Platforms
JavaScript networking - All