Age | Commit message (Collapse) | Author |
|
Signed-off-by: Balasankar "Balu" C <balasankarc@autistici.org>
|
|
(cherry picked from commit b519027459919125c5227fcb60519bdd18b4c780)
|
|
Moves the http.Client initialization inside the `httprange` package to
the zip VFS. This makes the type `Resource` depend on an http.Client
that needs to be passed on initialization.
It also makes the zip VFS initialize the client. It's possible to
reconfigure it to register a file protocol by calling vfs.Reconfigure
explicitly.
|
|
Add todo to reconfigure other vfs
|
|
|
|
Cleanup
|
|
Add zip config to appConfig
|
|
|
|
Prior to this change ALL processing failures
unrelated to "file missing" would return `404`.
This is inaccurate.
Processing failures are failure of GitLab Pages
and `500` should be returned in such cases.
|
|
In case of archives that do not store directories
we would fail to automatically serve `index.html`
for a `/` type of request.
This makes us create directories when traversing
the file list.
```
Archive: public-without-dirs.zip
Length Date Time Name
--------- ---------- ----- ----
40 2020-09-15 02:47 public/subdir/hello.html
14 2020-09-15 03:35 public/subdir/2bp3Qzs9CCW7cGnxhghdavZ2bJDTzvu2mrj6O8Yqjm3YMRozRZULxBBKzJXCK16GlsvO1GlbCyONf2LTCndJU9cIr5T3PLDN7XnfG00lEmf9DWHPXiAbbi0v8ioSjnoTqdyjELVKuhsGRGxeV9RptLMyGnbpJx1w2uECiUQSHrRVQNuq2xoHLlk30UAmis1EhGXP5kKprzHxuavsKMdT4XRP0d79tie4tjqtfRsP4y60hmNS1vSujrxzhDa
33 2020-09-15 02:47 public/subdir/linked.html
31 2020-09-15 02:47 public/404.html
33 2020-09-15 02:47 public/index.html
258 2020-10-13 12:40 public/bad_symlink.html
18 2020-10-13 12:40 public/symlink.html
```
|
|
Add vfs.VFS implementation for zip
Fix build errors
Clean zip vfs
Add tests for Root
Add zip serving metric
Return a zip.Instance() when source == zip
Add simple acceptance test for zip serving
Use correct contents
No need to start testServer in go routine
|