File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,11 @@ async fn check_impl(
133
133
return None ;
134
134
}
135
135
136
- let response = match CLIENT . get ( website. to_string ( ) ) . send ( ) . await {
136
+ let response = match if check_level == CheckLevel :: ForLinks {
137
+ CLIENT . get ( website. to_string ( ) ) . send ( ) . await
138
+ } else {
139
+ CLIENT . head ( website. to_string ( ) ) . send ( ) . await
140
+ } {
137
141
Ok ( response) => response,
138
142
Err ( err) => return Some ( CheckFailure :: Connection ( err) ) ,
139
143
} ;
@@ -649,14 +653,17 @@ mod tests {
649
653
#[ ignore]
650
654
async fn kians_site ( ) {
651
655
let base = Intern :: new ( Uri :: from_static ( "https://ring.purduehackers.com" ) ) ;
652
- assert ! (
653
- check(
654
- & Uri :: from_static( "https://kasad.com" ) ,
655
- CheckLevel :: ForLinks ,
656
- base,
657
- )
658
- . await
659
- . is_none( )
660
- ) ;
656
+
657
+ for level in [
658
+ CheckLevel :: None ,
659
+ CheckLevel :: JustOnline ,
660
+ CheckLevel :: ForLinks ,
661
+ ] {
662
+ assert ! (
663
+ check( & Uri :: from_static( "https://kasad.com" ) , level, base)
664
+ . await
665
+ . is_none( )
666
+ ) ;
667
+ }
661
668
}
662
669
}
You can’t perform that action at this time.
0 commit comments