Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/geosync/rest_api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@
[:workspace
[:name workspace]])])

;; GeoServer strips everything after the last "." of the final path segment as a
;; format extension, so a dotted workspace name ("...landfire-2.5.0") resolves to
;; "...landfire-2.5" and 404s. The trailing "/" leaves nothing to strip, the same
;; way get-workspace and update-workspace above already do it.
(defn delete-workspace [workspace recurse?]
["DELETE"
(str "/workspaces/" workspace "?recurse=" recurse?)
(str "/workspaces/" workspace "/?recurse=" recurse?)
nil])

;;===============================================================================================================
Expand Down Expand Up @@ -805,9 +809,11 @@
;;
;;===============================================================================================================

;; ".json" both defeats the extension parsing described above and keeps the body
;; JSON, which get-existing-gwc-layer reads with json/read-str.
(defn get-cached-layer [workspace layer]
["GET"
(str "/../gwc/rest/layers/" workspace ":" layer)
(str "/../gwc/rest/layers/" workspace ":" layer ".json")
nil])

;;FIXME: gridsubsets comes from the existing gwc layer. Figure out a way to
Expand Down Expand Up @@ -855,7 +861,7 @@
;; rows afterwards costs 83% less because the freed pages get reused.
(defn delete-cached-layer [workspace layer]
["DELETE"
(str "/../gwc/rest/layers/" workspace ":" layer)
(str "/../gwc/rest/layers/" workspace ":" layer ".xml")
nil])

;;===============================================================================================================
Expand Down