Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Set-Cookie" contains only last item #22064

Closed
dakiesse opened this issue Nov 1, 2018 · 2 comments
Closed

"Set-Cookie" contains only last item #22064

dakiesse opened this issue Nov 1, 2018 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@dakiesse
Copy link

dakiesse commented Nov 1, 2018

Environment

React Native Environment Info:
  System:
    OS: macOS 10.14
    CPU: x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 65.45 MB / 16.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 11.0.0 - /usr/local/bin/node
    Yarn: 1.10.1 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    Android SDK:
      Build Tools: 25.0.0, 26.0.3, 27.0.3
      API Levels: 23, 25, 26, 27
  IDEs:
    Android Studio: 3.0 AI-171.4443003
    Xcode: 10.1/10B61 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.6.0-alpha.8af6728 => 16.6.0-alpha.8af6728
    react-native: 0.57.4 => 0.57.4
  npmGlobalPackages:
    react-native-cli: 2.0.1
    react-native-create-library: 3.1.2

Description

My backend send a response with several "Set-Cookie":

some1=value1
some2=value2

If I make a request to endpoint via Postman I'll get this:

image

That's OK!

If I make the request through React Native I'll get only last "Set-Cookie" in the response:

image

I made requests via xmlHttpRequest and fetch. The result is the same.

Reproducible Demo

New project + append the code there:

export default class App extends Component<Props> {
  async componentDidMount() {
    const response = await fetch('http://localhost:3333/test')

    console.warn({fh: response.headers})
  }
}
@hey99xx
Copy link

hey99xx commented Nov 1, 2018

If this is only happening on Android it's the same as #18837 and #21795.

RN has a bug in their ReadableMap class that's causing this. Current workaround people have until an official fix is made is calling ReadableNativeMap.setUseNativeAccessor(true) on the Java side, see the comments on those 2 issues for details.

@kelset
Copy link
Contributor

kelset commented Nov 2, 2018

Duplicate, closing.

@kelset kelset closed this as completed Nov 2, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Nov 2, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Nov 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants