Skip to content

Commit

Permalink
fix(server): enable regex crate unicode-perl feature (#1714)
Browse files Browse the repository at this point in the history
Enable the `unicode-perl` feature flag on `regex` crate dependency in
`neqo-server` crate.

The following regex makes use of the feature:

``` rust
Regex::new(r"GET +/(\S+)(?:\r)?\n").unwrap()
```

Without the feature, the QUIC Interop tests panic with:

```
server  | thread 'main' panicked at neqo-server/src/old_https.rs:140:49:
server  | called `Result::unwrap()` on an `Err` value: Syntax(
server  | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
server  | regex parse error:
server  |     GET +/(\S+)(?:\r)?\n
server  |            ^^
server  | error: Unicode-aware Perl class not found (make sure the unicode-perl feature is enabled)
server  | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
server  | )
```
  • Loading branch information
mxinden authored Mar 6, 2024
1 parent a6bf979 commit 6f407c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neqo-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ neqo-http3 = { path = "./../neqo-http3" }
neqo-qpack = { path = "./../neqo-qpack" }
neqo-transport = { path = "./../neqo-transport" }
qlog = { version = "0.12", default-features = false }
regex = { version = "1.9", default-features = false }
regex = { version = "1.9", default-features = false, features = ["unicode-perl"] }
tokio = { version = "1", default-features = false, features = ["net", "time", "macros", "rt", "rt-multi-thread"] }

0 comments on commit 6f407c9

Please sign in to comment.