commit | 3a672f0fbbb55005302c2a12dae591646b7a776b | [log] [tgz] |
---|---|---|
author | Julie Qiu <julie@golang.org> | Thu Dec 24 21:19:54 2020 -0500 |
committer | Julie Qiu <julie@golang.org> | Tue Dec 29 00:22:48 2020 +0000 |
tree | 2e3d871c2c0c38b0c47bbe27a938ba0cd96b9d80 | |
parent | 482e5f168ebad7929a7cb90ff9dab75af4d5a217 [diff] |
internal/frontend: fix 400 handling in checkForPath checkForPath now returns a 404 for 400s, instead of ignoring this state. Change-Id: I50898380574ce40dba30b21a2ec2e109c06c0acf Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/279724 Reviewed-by: Jonathan Amsterdam <jba@google.com> Trust: Julie Qiu <julie@golang.org>
diff --git a/internal/frontend/fetch.go b/internal/frontend/fetch.go index fce071e..556cc53 100644 --- a/internal/frontend/fetch.go +++ b/internal/frontend/fetch.go
@@ -399,7 +399,7 @@ } // All remaining non-200 statuses will be in the 40x range. // In that case, just return a not found error. - if fr.status > 400 { + if fr.status >= 400 { fr.status = http.StatusNotFound fr.err = errModuleDoesNotExist return