You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pingora-cache/src/cache_control.rs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -19,12 +19,12 @@ use super::*;
19
19
use http::header::HeaderName;
20
20
use http::HeaderValue;
21
21
use indexmap::IndexMap;
22
-
use once_cell::sync::Lazy;
23
22
use pingora_error::{Error,ErrorType};
24
23
use regex::bytes::Regex;
25
24
use std::num::IntErrorKind;
26
25
use std::slice;
27
26
use std::str;
27
+
use std::sync::LazyLock;
28
28
29
29
/// The max delta-second per [RFC 9111](https://datatracker.ietf.org/doc/html/rfc9111#section-1.2.2)
30
30
// "If a cache receives a delta-seconds value
@@ -157,13 +157,13 @@ impl<'a> Iterator for ListValueIter<'a> {
157
157
// note the `token` implementation excludes disallowed ASCII ranges
158
158
// and disallowed delimiters: https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2
159
159
// though it does not forbid `obs-text`: %x80-FF
160
-
staticRE_CACHE_DIRECTIVE:Lazy<Regex> =
160
+
staticRE_CACHE_DIRECTIVE:LazyLock<Regex> =
161
161
// to break our version down further:
162
162
// `(?-u)`: unicode support disabled, which puts the regex into "ASCII compatible mode" for specifying literal bytes like \x7F: https://docs.rs/regex/1.10.4/regex/bytes/index.html#syntax
163
163
// `(?:^|(?:\s*[,;]\s*)`: allow either , or ; as a delimiter
164
164
// `([^\x00-\x20\(\)<>@,;:\\"/\[\]\?=\{\}\x7F]+)`: token (directive name capture group)
165
165
// `(?:=((?:[^\x00-\x20\(\)<>@,;:\\"/\[\]\?=\{\}\x7F]+|(?:"(?:[^"\\]|\\.)*"))))`: token OR quoted-string (directive value capture-group)
0 commit comments