Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2021-09-02 09:07:28 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-09-02 09:07:28 +0300
commitf1a69ce3f27b0bcd0b8369f909f655ded23d98c9 (patch)
treed3a7701a85845179bfc5f5e4932de78059224c04 /internal/serving/disk
parent29410749d7c0cf68d373d4c324f41a47d7101ce5 (diff)
refactor: replace magic numbers with http status codes
Diffstat (limited to 'internal/serving/disk')
-rw-r--r--internal/serving/disk/reader.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/serving/disk/reader.go b/internal/serving/disk/reader.go
index 7b92dfad..10af9e35 100644
--- a/internal/serving/disk/reader.go
+++ b/internal/serving/disk/reader.go
@@ -88,7 +88,7 @@ func (reader *Reader) tryFile(h serving.Handler) bool {
if endsWithSlash(urlPath) {
fullPath, err = reader.resolvePath(ctx, root, h.SubPath, "index.html")
} else {
- http.Redirect(h.Writer, h.Request, redirectPath(h.Request), 302)
+ http.Redirect(h.Writer, h.Request, redirectPath(h.Request), http.StatusFound)
return true
}
}