Skip to content

Commit c5dc96a

Browse files
committed
new: response headers are now checked against --http-success-string as well as the body
1 parent 6e4adc6 commit c5dc96a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plugins/http/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,12 @@ impl HTTP {
183183
} else {
184184
String::new()
185185
};
186+
let headers = format!("{:?}", response.headers());
186187
let body = response.text().await.unwrap_or(String::new());
187188
let content_length = body.len();
188189

189190
if let Some(success_string) = self.success_string.as_ref() {
190-
if !body.contains(success_string) {
191+
if !body.contains(success_string) && !headers.contains(success_string) {
191192
return None;
192193
}
193194
}

0 commit comments

Comments
 (0)