On our Geoserver 2.2 installation even requests that I think should fail return “HTTP/1.1 200 OK”.
The XML that is returned is correct, but the HTTP response codes are always 200. Is this expected behavior, or do I have something mis-configured?
michael@anonymised.com:~/dev/acg/js$ curl -i “http://hostname/geoserver/acg/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=wsp:real_feature&maxFeatures=50&outputFormat=text/xml;%20subtype=gml/3.2” 2>&1 | grep ‘200 OK’
HTTP/1.1 200 OK
michael@anonymised.com:~/dev/acg/js$ curl -i “http://hostname/geoserver/acg/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=wsp:fake_feature&maxFeatures=50&outputFormat=text/xml;%20subtype=gml/3.2” 2>&1 | grep ‘200 OK’
HTTP/1.1 200 OK
Even something like this returns a 200 status.
michael@anonymised.com:/tmp$ curl -i “http://michael-dev.mapfeeder.net:8080/geoserver/acg/ows” 2>&1
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Fri, 03 May 2013 14:30:58 GMT
<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport version=“1.0.0”
xsi:schemaLocation=“http://www.opengis.net/ows http://michael-dev.mapfeeder.net:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:ows=“http://www.opengis.net/ows”>
<ows:Exception exceptionCode=“InvalidParameterValue” locator=“service”>
ows:ExceptionTextNo service: ( ows )</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
Thanks,
Michael Moore
Support the digitization of the Iron County Miner newspaper archives
Like this project on Facebook: https://www.facebook.com/digitizeicm
On Fri, May 3, 2013 at 4:32 PM, Michael Moore <stuporglue@anonymised.com> wrote:
On our Geoserver 2.2 installation even requests that I think should fail
return "HTTP/1.1 200 OK".
The XML that is returned is correct, but the HTTP response codes are
always 200. Is this expected behavior, or do I have something
mis-configured?
Expected behavior, you always get 200 no matter of the result.
OGC is in the process changing its mind and having the OGC services return
a mix of 40x and 50x depending on the error,
but only on specs that are based on OWS 2.0
As of now that pretty much means WCS 2.0 only, all other specs are still
based on OWS 1.1
So, when they do WMS 1.4 and WFS 2.1 they will start returning full HTTP
codes, but before that, it's 200
Cheers
Andrea
--
GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
Thanks for the quick reply. It’ll be nice when we can use the 40x and 50x codes, but as long as things are working as intended, I guess that’s good enough for now.
···
On our Geoserver 2.2 installation even requests that I think should fail return “HTTP/1.1 200 OK”.
The XML that is returned is correct, but the HTTP response codes are always 200. Is this expected behavior, or do I have something mis-configured?
Expected behavior, you always get 200 no matter of the result.
OGC is in the process changing its mind and having the OGC services return a mix of 40x and 50x depending on the error,
but only on specs that are based on OWS 2.0
As of now that pretty much means WCS 2.0 only, all other specs are still based on OWS 1.1
So, when they do WMS 1.4 and WFS 2.1 they will start returning full HTTP codes, but before that, it’s 200