diff --git a/cmd/serve/http/http.go b/cmd/serve/http/http.go index 0360336dc..6dcd40f73 100644 --- a/cmd/serve/http/http.go +++ b/cmd/serve/http/http.go @@ -131,9 +131,13 @@ func (s *server) serveDir(w http.ResponseWriter, r *http.Request, dirRemote stri // Make the entries for display directory := serve.NewDirectory(dirRemote, s.HTMLTemplate) for _, node := range dirEntries { - directory.AddEntry(node.Path(), node.IsDir()) + directory.AddHTMLEntry(node.Path(), node.IsDir(), node.Size(), node.ModTime()) } + sortParm := r.URL.Query().Get("sort") + orderParm := r.URL.Query().Get("order") + directory.ProcessQueryParams(sortParm, orderParm) + directory.Serve(w, r) } diff --git a/cmd/serve/http/testdata/golden/index.html b/cmd/serve/http/testdata/golden/index.html index 8afb9b697..2ddb71e39 100644 --- a/cmd/serve/http/testdata/golden/index.html +++ b/cmd/serve/http/testdata/golden/index.html @@ -6,8 +6,8 @@