mirror of
https://github.com/epi052/feroxbuster
synced 2024-07-08 19:45:45 +00:00
added test for 0-length wildcard response
This commit is contained in:
parent
8cee7ce247
commit
c680be558a
|
@ -127,6 +127,19 @@ fn wildcard_should_filter_when_static_wildcard_found() {
|
|||
assert!(filter.should_filter_response(&resp));
|
||||
}
|
||||
|
||||
#[test]
|
||||
/// test should_filter on WilcardFilter where static logic matches but response length is 0
|
||||
fn wildcard_should_filter_when_static_wildcard_len_is_zero() {
|
||||
let mut resp = FeroxResponse::default();
|
||||
resp.set_wildcard(true);
|
||||
resp.set_url("http://localhost");
|
||||
|
||||
// default WildcardFilter is used in the code that executes when response.content_length() == 0
|
||||
let filter = WildcardFilter::new(false);
|
||||
|
||||
assert!(filter.should_filter_response(&resp));
|
||||
}
|
||||
|
||||
#[test]
|
||||
/// test should_filter on WilcardFilter where dynamic logic matches
|
||||
fn wildcard_should_filter_when_dynamic_wildcard_found() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user