Hi Simone,

On Tue, Aug 2, 2011 at 5:30 AM, Simone Tripodi
<simone.trip...@terradue.com>wrote:

> Hi all guys,
> I recently started playing with Geoserver REST APIs - nice work! - I got
> anyway some troubles with response statuses:
>
>  * when authentication fails, API replies with 400 Bad Request. I took a
> while before understanding that was a problem of authentication and not of
> how I submitted the request, wouldn't be wiser changing it to 401
> Unauthorized?
>

This one surprises me...  and indeed just doing a quick test request with
curl I see the proper behaviour:

 curl -s -w "%{http_code}" -u foo:bar -G
http://localhost:8080/geoserver/rest/workspaces.xml

returns "401". And so does:

 curl -s -w "%{http_code}" -G
http://localhost:8080/geoserver/rest/workspaces.xml

What's the exact request? And what client are you using?

>
>  * when creating a workspace, if the workspace is already present, Geosever
> replies with 500 Internal Server Error - again, wouldn't be wiser changing
> it to a different one like 409 Conflict? It would help clients
> discriminating situations when the server is really broken to when the
> resource has been already created!
>

Good suggestion. I suggest you open an improvement request in the bug
tracker... or even better yet submit a patch :)

-Justin


> Thoughts?
> Many thanks in advance, all the best!!!
> Simo
>
> ---------------------------------
> Simone Tripodi
> Analyst@Terradue s.r.l
> Apache Software Foundation Member
> http://people.apache.org/~simonetripodi
>
> Polo Tecnologico
> Via G. Peroni 442 I-00131 Rome - Italy
>
> http://www.terradue.com
>
> phone   +39 0680368952
> fax             +39 0691657526
> mobile  +39 3406767340
> skype   terradue.it
>
>
>
> ------------------------------------------------------------------------------
> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
> The must-attend event for mobile developers. Connect with experts.
> Get tools for creating Super Apps. See the latest technologies.
> Sessions, hands-on labs, demos & much more. Register early & save!
> http://p.sf.net/sfu/rim-blackberry-1
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>



-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to