Deploy blocks until old dies, fix cors via rproxy3, and who accepts acceptable name

This commit is contained in:
Bel LaPointe
2020-07-23 23:04:50 -06:00
parent 599d52cf8d
commit 461592ec40
3 changed files with 11 additions and 3 deletions

View File

@@ -94,8 +94,8 @@ func whoPut(namespace string, g storage.Graph, w http.ResponseWriter, r *http.Re
if err := json.Unmarshal(body, &operation); err != nil {
return err
}
if operation.Name != "" {
http.Error(w, `{"error":"cannot specify name in request body"}`, http.StatusBadRequest)
if operation.Name != "" && operation.Name != id {
http.Error(w, `{"error":"names differ between URL and request body"}`, http.StatusBadRequest)
return nil
}
if operation.Modified != 0 {