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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-11-29 13:49:54 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-11-29 13:49:54 +0300
commit0aa30f1feca22cb104cb136f60b0efcba9aac207 (patch)
tree087aef45eef808bc9b79663549865fd32f974f5b
parente02ad7970ec061391fe3f34736f851fa947f8922 (diff)
Link a few bug and technical debt issues in code
-rw-r--r--internal/serving/disk/reader.go5
-rw-r--r--internal/serving/lookup_path.go2
2 files changed, 5 insertions, 2 deletions
diff --git a/internal/serving/disk/reader.go b/internal/serving/disk/reader.go
index fb2201a1..ce4f1d8b 100644
--- a/internal/serving/disk/reader.go
+++ b/internal/serving/disk/reader.go
@@ -27,7 +27,10 @@ func (reader *Reader) tryFile(h serving.Handler) error {
if locationError, _ := err.(*locationDirectoryError); locationError != nil {
if endsWithSlash(urlPath) {
fullPath, err = reader.resolvePath(h.LookupPath.Path, h.SubPath, "index.html")
- } else { // TODO why are we doing that? In tests it redirects to HTTPS.
+ } else {
+ // TODO why are we doing that? In tests it redirects to HTTPS. This seems wrong,
+ // issue about this: https://gitlab.com/gitlab-org/gitlab-pages/issues/273
+
// Concat Host with URL.Path
redirectPath := "//" + host + "/"
redirectPath += strings.TrimPrefix(urlPath, "/")
diff --git a/internal/serving/lookup_path.go b/internal/serving/lookup_path.go
index a31a7165..4360358b 100644
--- a/internal/serving/lookup_path.go
+++ b/internal/serving/lookup_path.go
@@ -4,7 +4,7 @@ package serving
type LookupPath struct {
Prefix string // Project prefix, for example, /my/project in group.gitlab.io/my/project/index.html
Path string // Path is an internal and serving-specific location of a document
- IsNamespaceProject bool
+ IsNamespaceProject bool // IsNamespaceProject is DEPRECATED, see https://gitlab.com/gitlab-org/gitlab-pages/issues/272
IsHTTPSOnly bool
HasAccessControl bool
ProjectID uint64