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

added optional request headers for remote assests (android & ios) #805

Merged
merged 15 commits into from
Jun 25, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public void setSrc(final String uriString, final String type, final boolean isNe
headers.putAll(toStringMap(mRequestHeaders));
}

setDataSource(uriString);
setDataSource(mThemedReactContext, parsedUrl, headers);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In master (of the main repo) no headers are being passed to setDataSource. Even though the headers HashMap is being created (lines 247-251) and the cookies are added to it.

Is it me or was the headers never used?

Luckily setDataSource had an overload that accepted headers which I could pass them to.

} else if (isAsset) {
if (uriString.startsWith("content://")) {
Uri parsedUrl = Uri.parse(uriString);
Expand Down