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:
Diffstat (limited to 'internal/serving')
-rw-r--r--internal/serving/disk/reader.go6
-rw-r--r--internal/serving/disk/zip/serving_test.go2
-rw-r--r--internal/serving/lookup_path.go2
3 files changed, 5 insertions, 5 deletions
diff --git a/internal/serving/disk/reader.go b/internal/serving/disk/reader.go
index 4cc0ad8b..26425063 100644
--- a/internal/serving/disk/reader.go
+++ b/internal/serving/disk/reader.go
@@ -37,7 +37,7 @@ func (reader *Reader) serveRedirectsStatus(h serving.Handler, redirects *redirec
// tryRedirects returns true if it successfully handled request
func (reader *Reader) tryRedirects(h serving.Handler) bool {
ctx := h.Request.Context()
- root, err := reader.vfs.Root(ctx, h.LookupPath.Path, h.LookupPath.Sha256)
+ root, err := reader.vfs.Root(ctx, h.LookupPath.Path, h.LookupPath.SHA256)
if vfs.IsNotExist(err) {
return false
} else if err != nil {
@@ -70,7 +70,7 @@ func (reader *Reader) tryRedirects(h serving.Handler) bool {
func (reader *Reader) tryFile(h serving.Handler) bool {
ctx := h.Request.Context()
- root, err := reader.vfs.Root(ctx, h.LookupPath.Path, h.LookupPath.Sha256)
+ root, err := reader.vfs.Root(ctx, h.LookupPath.Path, h.LookupPath.SHA256)
if vfs.IsNotExist(err) {
return false
} else if err != nil {
@@ -133,7 +133,7 @@ func redirectPath(request *http.Request) string {
func (reader *Reader) tryNotFound(h serving.Handler) bool {
ctx := h.Request.Context()
- root, err := reader.vfs.Root(ctx, h.LookupPath.Path, h.LookupPath.Sha256)
+ root, err := reader.vfs.Root(ctx, h.LookupPath.Path, h.LookupPath.SHA256)
if vfs.IsNotExist(err) {
return false
} else if err != nil {
diff --git a/internal/serving/disk/zip/serving_test.go b/internal/serving/disk/zip/serving_test.go
index 66e52046..ed18e6c3 100644
--- a/internal/serving/disk/zip/serving_test.go
+++ b/internal/serving/disk/zip/serving_test.go
@@ -120,7 +120,7 @@ func TestZip_ServeFileHTTP(t *testing.T) {
LookupPath: &serving.LookupPath{
Prefix: "/zip/",
Path: test.vfsPath,
- Sha256: test.sha256,
+ SHA256: test.sha256,
},
SubPath: test.path,
}
diff --git a/internal/serving/lookup_path.go b/internal/serving/lookup_path.go
index f5ad2ab5..421e2a51 100644
--- a/internal/serving/lookup_path.go
+++ b/internal/serving/lookup_path.go
@@ -5,7 +5,7 @@ type LookupPath struct {
ServingType string // Serving type being used, like `zip`
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
- Sha256 string
+ SHA256 string
IsNamespaceProject bool // IsNamespaceProject is DEPRECATED, see https://gitlab.com/gitlab-org/gitlab-pages/issues/272
IsHTTPSOnly bool
HasAccessControl bool