Skip to content

Fetch no longer returns all rows of the same-name response headers after RN Upgrade #18837

@Rah1x

Description

@Rah1x

Fetch is no longer returning all rows of the same-name response headers! This only just happened after recent upgrade.

Environment

Environment:
OS: Windows 10
Node: 9.2.0
Yarn: 1.3.2
npm: 5.8.0
Watchman: Not Found
Xcode: N/A
Android Studio: Version 3.0.0.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: ^0.55.3 => 0.55.3

Steps to Reproduce

Server returns the following response

return response()->json(['msg'=>'1'], 200)
->withHeaders(['Content-Type'=>'application/json', 't1'=>[1, 2]]);

** react native code **

let response = await fetch('http://im-sick-and-tired-of-hunting-react-native-bugs',
{
            credentials: 'include',
            method: 'GET',
            cache: 'no-cache',
            mode: 'cors',
            headers: {'Cache-Control': 'no-cache', 'Accept':'*/*', 'Content-Type':'application/json'},
});
console.log(response.headers.get('t1')); 

Expected Behavior

The test hdr (t1) must have both values but only the 2nd one is received. See the response from postman

image

Actual Behavior

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThere has been a lack of activity on this issue and it may be closed soon.🌐NetworkingRelated to a networking API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions