From 15e11e62ae2493472114cea858b5b4468832f9b2 Mon Sep 17 00:00:00 2001 From: Chawye Hsu Date: Sun, 6 Oct 2019 16:35:09 +0800 Subject: [PATCH] fix(checkurls): Trim renaming suffix in url (#3677) --- bin/checkurls.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/checkurls.ps1 b/bin/checkurls.ps1 index 6e08a86e84..93fa33c03a 100644 --- a/bin/checkurls.ps1 +++ b/bin/checkurls.ps1 @@ -50,6 +50,9 @@ Write-Host ']ailed' Write-Host ' | | |' function test_dl([String] $url, $cookies) { + # Trim renaming suffix, prevent getting 40x response + $url = ($url -split '#/')[0] + $wreq = [Net.WebRequest]::Create($url) $wreq.Timeout = $Timeout * 1000 if ($wreq -is [Net.HttpWebRequest]) {