diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-28 18:13:24 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-28 18:13:45 +0900 |
| commit | 1b2473fd155b88c8aa90aaa844d183af617b6e8a (patch) | |
| tree | 6d7257b3dfd7bb27418e0f650e91c039b2d02671 /crates/shirabe/src/util/http | |
| parent | 53f1fb395f33e0fb8db9aebd09ea9082f650f9f1 (diff) | |
| download | php-shirabe-1b2473fd155b88c8aa90aaa844d183af617b6e8a.tar.gz php-shirabe-1b2473fd155b88c8aa90aaa844d183af617b6e8a.tar.zst php-shirabe-1b2473fd155b88c8aa90aaa844d183af617b6e8a.zip | |
fix(util): restore PHP delimiters in ported regex patterns
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/util/http')
| -rw-r--r-- | crates/shirabe/src/util/http/response.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/shirabe/src/util/http/response.rs b/crates/shirabe/src/util/http/response.rs index 8b7bd34..5398fe2 100644 --- a/crates/shirabe/src/util/http/response.rs +++ b/crates/shirabe/src/util/http/response.rs @@ -29,7 +29,7 @@ impl Response { pub fn get_status_message(&self) -> Option<String> { let mut value = None; for header in &self.headers { - if Preg::is_match(r"(?i)^HTTP/\S+ \d+", header) { + if Preg::is_match(r"{^HTTP/\S+ \d+}i", header) { // In case of redirects, headers contain the headers of all responses // so we can not return directly and need to keep iterating value = Some(header.clone()); |
