aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/http/response.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/util/http/response.rs')
-rw-r--r--crates/shirabe/src/util/http/response.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/shirabe/src/util/http/response.rs b/crates/shirabe/src/util/http/response.rs
index 6fe95200..4f824baa 100644
--- a/crates/shirabe/src/util/http/response.rs
+++ b/crates/shirabe/src/util/http/response.rs
@@ -1,7 +1,7 @@
//! ref: composer/src/Composer/Util/Http/Response.php
use crate::json::JsonFile;
-use shirabe_php_shim::{PhpMixed, php_regex, preg_match, preg_quote};
+use shirabe_php_shim::{PhpMixed, php_regex, preg_is_match, preg_match, preg_quote};
#[derive(Debug)]
pub struct Response {
@@ -28,7 +28,7 @@ impl Response {
pub fn get_status_message(&self) -> Option<String> {
let mut value = None;
for header in &self.headers {
- if preg_match(php_regex!(r"{^HTTP/\S+ \d+}i"), header).is_some() {
+ if preg_is_match(php_regex!(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());