Hi, lately I've been going around talking to various people setting up GeoServer in production, in enviroments where HTTP request monitoring with some sort of Apache plugin is standard practice, and in all these cases I hear complaints about the fact GeoServer, and OWS services in general, return HTTP 200 even in case of exception.
The reason for the complaint is obvious, it does not allow proper monitoring of exceptions (I know about the monitoring module, but these people want GS to play nicely in their existing, enterprise wide monitoring enviroment, having an extra monitoring tool to deal with is not something they look for in the short time, though I'm sure they'll eventually see the benefit of having something that actually understands and classifies the various OGC requests). So far I thought that the OGC specification simply never said anything about the status codes, and looking into OWS 1.0 I actually did not find anything at all (it does not even say to return 200 actually). However in OWS 1.1, page 110 of the printout, it says: -------------------------------------------------------------------------------------------------------------------------------------------- A.4.1.5 HTTP response status code a) Test purpose: Verify that a service request which generates an exception produces a response that contains 1) a service exception report, and 2) a status code indicating an error. -------------------------------------------------------------------------------------------------------------------------------------------- Ah ha! So at the very least the WCS 1.1 and WPS 1.0 implementations, both based on OWS 1.1, are not setting the status codes as expected from the spec (yes, the CITE tests are not complaining...) Generally speaking I would really like to have all service exceptions report back proper status codes based on the on the service exception "exceptionCode": - HTTP 400 for: OperationNotSupported, MissingParameterValue, InvalidParameterValue, VersionNegotiationFailed, InvalidUpdateSequence - HTTP 500 for NoApplicableCode or missing code (status code reference here: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) The only concern I have at the moment is that some client might break as a result of this change in behavior. I mean, generally speaking OGC clients should not be concerned at all with the status codes, but one cannot be completely sure. Should we make this behavior configurable? What do you think? Cheers Andrea ----------------------------------------------------- Ing. Andrea Aime Senior Software Engineer GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584962313 fax: +39 0584962313 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ----------------------------------------------------- ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
