@@ -893,6 +893,40 @@ mod tests {
893893 ) ;
894894 }
895895
896+ #[ tokio:: test]
897+ async fn test_http_enumeration_with_cyrillic_chars ( ) {
898+ let mut http = HTTP :: new ( Strategy :: Enumeration ) ;
899+ let mut opts = Options :: default ( ) ;
900+
901+ opts. http . http_success_codes = "200" . to_owned ( ) ;
902+ opts. http . http_success_string = Some ( "успех" . to_owned ( ) ) ;
903+ opts. http . http_method = "GET" . to_owned ( ) ;
904+
905+ let creds = Credentials {
906+ target : "localhost:3000/тест/страница" . to_owned ( ) ,
907+ username : "пользователь" . to_owned ( ) ,
908+ password : "пароль" . to_owned ( ) ,
909+ } ;
910+
911+ let target_url = http. get_target_url ( & creds) . unwrap ( ) ;
912+ assert_eq ! ( target_url, "http://localhost:3000/%D1%82%D0%B5%D1%81%D1%82/%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0" ) ;
913+
914+ let status = 200 ;
915+ let content_type = String :: new ( ) ;
916+ let content_length = 0 ;
917+ let headers = String :: new ( ) ;
918+ let body = "операция успех завершена" . to_owned ( ) ;
919+
920+ assert_eq ! ( Ok ( ( ) ) , http. setup( & opts) ) ;
921+ assert_eq ! ( http. success_codes, vec![ 200 ] ) ;
922+ assert ! (
923+ http. is_success( & creds, status, content_type, content_length, headers, body)
924+ . await
925+ . is_some( )
926+ ) ;
927+
928+ }
929+
896930 #[ tokio:: test]
897931 async fn test_is_success_custom_code ( ) {
898932 let mut http = HTTP :: new ( Strategy :: Enumeration ) ;
0 commit comments