File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ sub is-valid-display($content) {
3131
3232my % bad-links = BagHash . new ;
3333my $ network-testing = % * ENV <NETWORK_TESTING >: exists . so ;
34+ my % good-links ;
35+
3436sub is-valid-link ($ links ) {
3537 for @$ links -> $ link {
3638 if $ link . starts-with (' /' ) {
@@ -107,6 +109,12 @@ sub is-valid-link($links) {
107109 # Skip known problematic URLs (403 via Cro, fine via browser)
108110 next if $ link eq " https://dev.mysql.com/downloads/repo/apt/" ;
109111
112+ # auto-pass if we already pulled this session
113+ if % good-links {$ link }: exists {
114+ pass " HTTP KNOWN $ link" ;
115+ next ;
116+ }
117+
110118 my $ response = await $ ua . get : $ link , user-agent => ' Raku Docs Validator' ;
111119 CATCH {
112120 when X::Cro ::HTTP2::GoAway {
@@ -140,6 +148,7 @@ sub is-valid-link($links) {
140148 }
141149 next ;
142150 }
151+ % good-links {$ link }++ ;
143152 pass " HTTP { $ response . status} $ link" ;
144153 next ;
145154 }
You can’t perform that action at this time.
0 commit comments