File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -233,9 +233,7 @@ impl<'a> Extractor<'a> {
233233 }
234234
235235 // request and report assumed file
236- if ( resp. is_file ( ) || !resp. is_directory ( ) )
237- && !c_handles. config . force_recursion
238- {
236+ if !resp. is_directory ( ) && !c_handles. config . force_recursion {
239237 log:: debug!( "Extracted File: {resp}" ) ;
240238
241239 c_scanned_urls. add_file_scan (
Original file line number Diff line number Diff line change @@ -192,26 +192,6 @@ impl FeroxResponse {
192192 self . text . shrink_to_fit ( ) ; // allocated capacity shrinks to reflect the new size
193193 }
194194
195- /// Make a reasonable guess at whether the response is a file or not
196- ///
197- /// Examines the last part of a path to determine if it has an obvious extension
198- /// i.e. http://localhost/some/path/stuff.js where stuff.js indicates a file
199- ///
200- /// Additionally, inspects query parameters, as they're also often indicative of a file
201- pub fn is_file ( & self ) -> bool {
202- let has_extension = if let Some ( mut path) = self . url . path_segments ( ) {
203- if let Some ( last) = path. next_back ( ) {
204- last. contains ( '.' ) // last segment has some sort of extension, probably
205- } else {
206- false
207- }
208- } else {
209- false
210- } ;
211-
212- self . url . query_pairs ( ) . count ( ) > 0 || has_extension
213- }
214-
215195 /// Returns line count of the response text.
216196 pub fn line_count ( & self ) -> usize {
217197 self . line_count
You can’t perform that action at this time.
0 commit comments