[Geoserver-devel] Bug with REST API URL parsing

Hello all,

There is currently a bug with the REST API.

I am trying to DELETE the “it.geosolutions” workspace:

curl -v -u admin:geoserver -XDELETE “http://192.168.2.237:8080/geoserver/rest/workspaces/it.geosolutions?recurse=True

Does not work, it gives “No such workspace: it”

curl -v -u admin:geoserver -XDELETE “http://192.168.2.237:8080/geoserver/rest/workspaces/it%2Egesolutions?recurse=True

Does work - but I shouldn’t have to do that a dot is a perfectly valid character that doesn’t need encoding in a URL.

This causes problems with some HTTP modules (Python Requests) as they normalise URLs and will remove and %2E and replace it with a dot.

Cheers,

···

James Sewell,
PostgreSQL Team Lead / Solutions Architect


Level 2, 50 Queen St, Melbourne VIC 3000

P (+61) 3 8370 8000 W www.lisasoft.com F (+61) 3 8370 8099

Can you open a ticket at https://osgeo-org.atlassian.net/projects/GEOS/summary so we don’t lose this

Cheers

Ian

···

On 7 July 2016 at 03:46, James Sewell <james.sewell@anonymised.com> wrote:

Hello all,

There is currently a bug with the REST API.

I am trying to DELETE the “it.geosolutions” workspace:

curl -v -u admin:geoserver -XDELETE “http://192.168.2.237:8080/geoserver/rest/workspaces/it.geosolutions?recurse=True

Does not work, it gives “No such workspace: it”

curl -v -u admin:geoserver -XDELETE “http://192.168.2.237:8080/geoserver/rest/workspaces/it%2Egesolutions?recurse=True

Does work - but I shouldn’t have to do that a dot is a perfectly valid character that doesn’t need encoding in a URL.

This causes problems with some HTTP modules (Python Requests) as they normalise URLs and will remove and %2E and replace it with a dot.

Cheers,

James Sewell,
PostgreSQL Team Lead / Solutions Architect


Level 2, 50 Queen St, Melbourne VIC 3000

P (+61) 3 8370 8000 W www.lisasoft.com F (+61) 3 8370 8099


The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.


Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Ian Turton