denoland / denoland/rust-urlpattern
Validate protocol regexp object earlier
- Dominant language
- Rust
- Stars
- 76
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
One of the reasons PR 93 (https://github.com/denoland/rust-urlpattern/pull/93) was needed is that `compute_protocol_matches_special_scheme` [doesn't check](https://github.com/denoland/rust-urlpattern/blob/main/src/constructor_parser.rs#L261-L265) for an error-free regexp object, as done with other component compilations that check `optionally_transpose_regex_error`, for [example](https://github.com/denoland/rust-urlpattern/blob/main/src/lib.rs#L352).
PR 93 prevents the crash, and the error will bubble up the same, but I think we can still catch this before getting as far as matching on the protocol (even though this is kind of a special case of needing to parse and match on the protocol so the parser can create an Init object correctly).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.