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:
authorJaime Martinez <jmartinez@gitlab.com>2020-09-09 09:23:02 +0300
committerVladimir Shushlin <v.shushlin@gmail.com>2020-09-21 13:53:18 +0300
commite0dc0e38b1ca181caa2e85df7561da36aef8054e (patch)
tree62f90b1cdc41917f51e1195dfffc051d676ed5ed /internal/httprange
parentb58d528f947b9f5440e163386a49f4d581290982 (diff)
Add zip package that implements vfs.Root
Adds a zip package capable of reading zip files from an httprange.Resource. It reads archive file contents into memory per archive that is requested from the vfs.Root. WIP: add simple test for archive reader WIP: fix build WIP: update archive test WIP: adding tests for archive WIP: print more info WIP: update zip file correct symlink WIP: use correct file Add bad symlink file to zip Update handling long symlinks update documentation and reorg code fix up stuff
Diffstat (limited to 'internal/httprange')
-rw-r--r--internal/httprange/http_reader.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/httprange/http_reader.go b/internal/httprange/http_reader.go
index 474b589f..4e7db6bc 100644
--- a/internal/httprange/http_reader.go
+++ b/internal/httprange/http_reader.go
@@ -8,6 +8,7 @@ import (
"time"
"gitlab.com/gitlab-org/gitlab-pages/internal/httptransport"
+ "gitlab.com/gitlab-org/gitlab-pages/internal/vfs"
"gitlab.com/gitlab-org/gitlab-pages/metrics"
)
@@ -41,6 +42,9 @@ type Reader struct {
offset int64
}
+// ensure that Reader is seekable
+var _ vfs.SeekableFile = &Reader{}
+
// TODO: make this configurable/take an http client when creating a reader/ranged reader
// instead https://gitlab.com/gitlab-org/gitlab-pages/-/issues/457
var httpClient = &http.Client{