We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Description: Multiple Set-Cookie headers are valid response according to the RFC standard.
Steps to Reproduce: Make a call to a an URL where multiple Set-Cookie headers are returned
Expected Behavior: Further calls should be made with all cookies set.
Actual Behavior: Only the last cookie is set.
Environment: Library Version: all React Native Version: all Platform: Android
Cause: The code in ReactNativeBlobUtilReq.java doesn't handle case when the same header received several times. See below:
headers.putString(resp.headers().name(i), resp.headers().value(i));
The last value from Set-Cookie overwrites previous values.
private WritableMap getResponseInfo(Response resp, boolean isBlobResp) { WritableMap info = Arguments.createMap(); info.putInt("status", resp.code()); info.putString("state", "2"); info.putString("taskId", this.taskId); info.putBoolean("timeout", timeout); WritableMap headers = Arguments.createMap(); for (int i = 0; i < resp.headers().size(); i++) { headers.putString(resp.headers().name(i), resp.headers().value(i)); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description:
Multiple Set-Cookie headers are valid response according to the RFC standard.
Steps to Reproduce:
Make a call to a an URL where multiple Set-Cookie headers are returned
Expected Behavior:
Further calls should be made with all cookies set.
Actual Behavior:
Only the last cookie is set.
Environment:
Library Version: all
React Native Version: all
Platform: Android
Cause:
The code in ReactNativeBlobUtilReq.java doesn't handle case when the same header received several times.
See below:
headers.putString(resp.headers().name(i), resp.headers().value(i));
The last value from Set-Cookie overwrites previous values.
The text was updated successfully, but these errors were encountered: