Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ec0d5b9
Stop following redirects when max-redirects is hit instead of creatin…
thomas-zahner Jun 5, 2025
049075a
Update test & remove redundant test
thomas-zahner Jun 5, 2025
3fd68ca
First attempt at redirection tracking
thomas-zahner Jun 5, 2025
92ed479
Add ideas
thomas-zahner Jun 5, 2025
b68ff7b
Move todo
thomas-zahner Jun 5, 2025
4150e15
Expand Status::Redirected
thomas-zahner Jun 11, 2025
f0c5e28
Remove file
thomas-zahner Jun 11, 2025
14119f6
Extract RedirectTracker & handle redirections with fragments
thomas-zahner Jul 3, 2025
7513537
No special handling of redirects: remove Status::Redirected and Error…
thomas-zahner Jul 4, 2025
24b04b7
WIP
thomas-zahner Jul 10, 2025
d96481b
Merge branch 'master' into redirect-reporting
thomas-zahner Aug 28, 2025
482f9cc
Apply clippy's suggestions
thomas-zahner Aug 28, 2025
5962f67
Extract method & improve test
thomas-zahner Aug 28, 2025
bb10776
Revert "remove Status::Redirected"
thomas-zahner Aug 28, 2025
a228c05
Update redirection handling & add handle_redirected
thomas-zahner Aug 28, 2025
5fd38a4
Add RedirectChain to Status::Redirected
thomas-zahner Aug 29, 2025
99c5983
Merge branch 'master' into redirect-reporting
thomas-zahner Sep 3, 2025
79a80aa
clippy --fix
thomas-zahner Sep 3, 2025
762da6b
Replace unicode escapes with literal value for simplicity
thomas-zahner Sep 3, 2025
156ee4e
Show redirects in compact view
thomas-zahner Sep 3, 2025
b74cfb0
Fix tests
thomas-zahner Sep 4, 2025
613ec22
Update redirect output color
thomas-zahner Sep 4, 2025
69cd4f6
Add redirect_map for JSON output
thomas-zahner Sep 4, 2025
34e5f34
Create test_redirect_json & extract function
thomas-zahner Sep 4, 2025
cbd939f
Update lychee-lib/src/types/redirect_tracker.rs
thomas-zahner Sep 5, 2025
8e5dc74
Rename RedirectChain to Redirects
thomas-zahner Sep 5, 2025
061e6e1
Rename RedirectTracker to RedirectHistory
thomas-zahner Sep 5, 2025
21f434b
Minor improvements
thomas-zahner Sep 5, 2025
2170435
Update README
thomas-zahner Sep 5, 2025
483cad8
Create test-utils to share testing functionality between lychee-lib a…
thomas-zahner Sep 5, 2025
b96b874
Port lychee-lib/src/test_utils.rs to new test-utils crate
thomas-zahner Sep 5, 2025
c62b099
Fix space
thomas-zahner Sep 5, 2025
d4210f8
Update doc comment
thomas-zahner Sep 11, 2025
b630508
Apply review suggestions
thomas-zahner Sep 11, 2025
bfd231c
Put doc comments before attributes
thomas-zahner Sep 11, 2025
59bc64e
Prevent accidental publishing of test-utils crate
thomas-zahner Sep 11, 2025
9a20ce6
Update verbose redirect message
thomas-zahner Sep 11, 2025
c4e059e
Merge branch 'master' into redirect-reporting
thomas-zahner Sep 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Stop following redirects when max-redirects is hit instead of creatin…
…g an error. This allows users to still accept redirections
  • Loading branch information
thomas-zahner committed Jun 5, 2025
commit ec0d5b9de2060f42027b20b06b30b745bd0b6580
2 changes: 1 addition & 1 deletion lychee-lib/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ impl ClientBuilder {
let max_redirects = self.max_redirects;
let redirect_policy = redirect::Policy::custom(move |attempt| {
if attempt.previous().len() > max_redirects {
attempt.error("too many redirects")
attempt.stop()
} else {
debug!("Redirecting to {}", attempt.url());
attempt.follow()
Expand Down