Stabilize features patch and archive-site.

The PATCH method has been tested by myself and on Codeberg and found
to work satisfactorily.

Because using PATCH causes the git-pages server to store state that
is not necessarily easily reproducible from any single specific source
(i.e. it stores a composition of many disparate requests), it may be
necessary to back it up. For this, the feature `archive-site` is also
stabilized. It has not seen much use but not providing a backup method
would be a disservice.
This commit is contained in:
Catherine
2025-12-05 03:55:54 +00:00
parent 8eeaf222ca
commit da0758b972
2 changed files with 4 additions and 9 deletions
+1 -6
View File
@@ -205,7 +205,7 @@ func getPage(w http.ResponseWriter, r *http.Request) error {
w.Write(ManifestJSON(manifest))
return nil
case metadataPath == "archive.tar" && config.Feature("archive-site"):
case metadataPath == "archive.tar":
// same as above
_, err := AuthorizeMetadataRetrieval(r)
if err != nil {
@@ -507,11 +507,6 @@ func putPage(w http.ResponseWriter, r *http.Request) error {
}
func patchPage(w http.ResponseWriter, r *http.Request) error {
if !config.Feature("patch") {
http.Error(w, "method not allowed", http.StatusMethodNotAllowed)
return nil
}
for _, header := range []string{
"If-Modified-Since", "If-Unmodified-Since", "If-Match", "If-None-Match",
} {