Hi,
so following up the discussion of last week I added a filter that makes
sure responses with a code other than 200 are at least 513 bytes long.
That also required changing the gzip filter not to compress the output
in that case.
Then modified the service exception handlers all non problematic services
(WFS, WCS 1.1, WPS) to set the http status code, and made WPS
use the new set of excpeption codes
Still have to migrate WFS and WMS, but it's mostly search and replace.
For WMS 1.0 and WCS 1.0 I simply did not set the status code.
What I did for all exceptions though was to set a couple of headers,
owsStatusCode and owsExceptionCode, that always contain the
http status code we'd like to use in a perfect world, and also the
ows exception code (just for completeness)
A monitoring software can look at those headers for the time being
to decide whether the request failed or not
About having a request param to force the status code to be 200,
I think it's not necessary as the only services that show problems
with the 400/500 codes are simply not using them
Hum... which makes me realize, I would actually have to make sure
WMS 1.3 sets the status code properly, as in that case the mime
type is just text/xml.
Anyways, opinions? Am I heading in the right direction?
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
-----------------------------------------------------