Sander Schaminee ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5fdb3cc6a9d030010713788d
 ) *created* an issue

GeoServer ( 
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiOWE1NDJlODlhYzU4NDNhNDlmOWQyZmRmNzBkYjk3N2UiLCJwIjoiaiJ9
 ) / Improvement ( 
https://osgeo-org.atlassian.net/browse/GEOS-10053?atlOrigin=eyJpIjoiOWE1NDJlODlhYzU4NDNhNDlmOWQyZmRmNzBkYjk3N2UiLCJwIjoiaiJ9
 ) GEOS-10053 ( 
https://osgeo-org.atlassian.net/browse/GEOS-10053?atlOrigin=eyJpIjoiOWE1NDJlODlhYzU4NDNhNDlmOWQyZmRmNzBkYjk3N2UiLCJwIjoiaiJ9
 ) Return 410 instead of 404 for resource DELETE requests in REST API ( 
https://osgeo-org.atlassian.net/browse/GEOS-10053?atlOrigin=eyJpIjoiOWE1NDJlODlhYzU4NDNhNDlmOWQyZmRmNzBkYjk3N2UiLCJwIjoiaiJ9
 )

Issue Type: Improvement Assignee: Unassigned Components: REST Created: 
06/May/21 10:07 AM Priority: Medium Reporter: Sander Schaminee ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5fdb3cc6a9d030010713788d
 )

When I delete a style or layer using the GeoServer REST API, it returns a 404 
whenever the style or layer no longer exists on the server.
In my opinion, it should only return a 404 if the URL is non-existing. For 
example, if the style resides within a workspace, it would be fine to return a 
404 if the workspace name in the URL contained a typo.
404's are also fine when doing GET/POST/PUT requests on layers or styles that 
do not exist.

However, when I do a DELETE and get a 404, there's no way to tell if the 
resource simply does not exist (anymore) on the server, or that I made a typo 
in the URL.

I would like to propose to return a *410 ( 
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/410 )* instead in this 
case:

> 
> 
> 
> 410 Gone
> 
> 
> 
> This response is sent when the requested content has been permanently
> deleted from server, with no forwarding address. Clients are expected to
> remove their caches and links to the resource. The HTTP specification
> intends this status code to be used for "limited-time, promotional
> services". APIs should not feel compelled to indicate resources that have
> been deleted with this status code.
> 
> 

Please let me know your thoughts on this matter.

( 
https://osgeo-org.atlassian.net/browse/GEOS-10053#add-comment?atlOrigin=eyJpIjoiOWE1NDJlODlhYzU4NDNhNDlmOWQyZmRmNzBkYjk3N2UiLCJwIjoiaiJ9
 ) Add Comment ( 
https://osgeo-org.atlassian.net/browse/GEOS-10053#add-comment?atlOrigin=eyJpIjoiOWE1NDJlODlhYzU4NDNhNDlmOWQyZmRmNzBkYjk3N2UiLCJwIjoiaiJ9
 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( 
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
 ) or iOS ( 
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100159- 
sha1:f2d09e5 )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to