mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-08-28 03:46:06 +00:00
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:
+1
-6
@@ -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",
|
||||
} {
|
||||
|
||||
Reference in New Issue
Block a user