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

Support ';&' as an alternative to '?' in bundle URLs #974

Closed
wants to merge 1 commit into from

Conversation

robhogan
Copy link
Contributor

@robhogan robhogan commented May 2, 2023

Summary:
Recent versions of JavaScriptCore strip query strings from Error.prototype.stack, which breaks our use of query strings to carry bundle build parameters. See facebook/react-native#36794 for context.

This allows Metro to accept an alternative format where we interpret the special reserved character sequence ;&, the first time it appears in a URL path, as equivalent to ?.

So that this does not break custom rewriteRequestUrl implementations, we (temporarily) pass a normalised URL (;& replaced with ?), and then reverse that operation on the URL returned by rewriteRequestUrl. [Simplifying the details here somewhat - see the implementation for specifics].

Changelog:

**[Feature]**: Support alternative JavaScriptCore-safe URL format (`;&` as `?`).

Differential Revision: D45477505

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels May 2, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45477505

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45477505

robhogan added a commit to robhogan/metro that referenced this pull request May 3, 2023
Summary:
Pull Request resolved: facebook#974

Recent versions of JavaScriptCore strip query strings from `Error.prototype.stack`, which breaks our use of query strings to carry bundle build parameters. See facebook/react-native#36794 for context.

This allows Metro to accept an alternative format where we interpret the special reserved character sequence `;&`, the first time it appears in a URL *path*, as equivalent to `?`.

So that this does not break custom `rewriteRequestUrl` implementations, we (temporarily) pass a normalised URL (`;&` replaced with `?`), and then reverse that operation on the URL returned by `rewriteRequestUrl`. *[Simplifying the details here somewhat - see the implementation for specifics].*

Changelog:
```
**[Feature]**: Support alternative JavaScriptCore-safe URL format (`;&` as `?`).
```

Differential Revision: D45477505

fbshipit-source-id: 187c959b79a0b2c5878ff44d76bb9afaeefb17c1
Summary:
Pull Request resolved: facebook#974

Recent versions of JavaScriptCore strip query strings from `Error.prototype.stack`, which breaks our use of query strings to carry bundle build parameters. See facebook/react-native#36794 for context.

This allows Metro to accept an alternative format where we interpret the special reserved character sequence `;&`, the first time it appears in a URL *path*, as equivalent to `?`.

So that this does not break custom `rewriteRequestUrl` implementations, we (temporarily) pass a normalised URL (`;&` replaced with `?`), and then reverse that operation on the URL returned by `rewriteRequestUrl`. *[Simplifying the details here somewhat - see the implementation for specifics].*

Changelog:
```
**[Feature]**: Support alternative JavaScriptCore-safe URL format (`;&` as `?`).
```

Differential Revision: D45477505

fbshipit-source-id: c082b4cade12a573e09dcb0d61d0006dcc97a41c
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D45477505

@robhogan
Copy link
Contributor Author

robhogan commented Jun 3, 2023

Superseded by #989

@robhogan robhogan closed this Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants