aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-07-07 20:18:18 +0900
committerOphestra <cat@gensokyo.uk>2026-07-07 20:18:18 +0900
commit76360979f9b7898c1e331914b6037b01eab79807 (patch)
tree6955b05d183c72a774b00befc3f4be1c0be11933 /cmd
parent6d55ee536e902d059380f79e870d06547627cc7c (diff)
internal/rosa: mirror response write methods
For the fs.FS implementation and static publishing. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mbf/cache.go2
-rw-r--r--cmd/mbf/main.go4
2 files changed, 4 insertions, 2 deletions
diff --git a/cmd/mbf/cache.go b/cmd/mbf/cache.go
index 20dbd855..aea54546 100644
--- a/cmd/mbf/cache.go
+++ b/cmd/mbf/cache.go
@@ -100,7 +100,7 @@ func (cache *cache) open() (err error) {
return
}
var r rosa.Remote
- if r, err = rosa.NewRemote(cache.mirror, pub, http.DefaultClient); err != nil {
+ if r, err = rosa.NewRemote(http.DefaultClient, cache.mirror, pub); err != nil {
cache.c.Close()
return err
}
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go
index b2f2c0d6..471b595a 100644
--- a/cmd/mbf/main.go
+++ b/cmd/mbf/main.go
@@ -544,7 +544,9 @@ func main() {
if base, err := os.OpenRoot(cm.base); err != nil {
return err
} else {
- h = rosa.NewMirror(msg, base.FS(), key)
+ var mux http.ServeMux
+ rosa.NewMirror(msg, base.FS(), key).Register(&mux)
+ h = &mux
}
server := http.Server{Addr: args[0], Handler: h}