geoadmin / mf-chsdi3

api3.geo.admin.ch source code
https://api3.geo.admin.ch
Other
33 stars 15 forks source link

mapproxy 500 error #1600

Closed cedricmoullet closed 9 years ago

cedricmoullet commented 9 years ago

http://api3.geo.admin.ch/mapproxy/service?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&SRS=EPSG%3A4326&WIDTH=768&HEIGHT=496&BBOX=6.990654807967476%2C46.033800893281246%2C7.023613792342768%2C46.04857638750783&INFO_FORMAT=text%2Fhtml&X=316.45&Y=183.55&BUFFER=15&QUERY_LAYERS=SWISS-PIXELKARTE&LAYERS=ch.swisstopo.pixelkarte-farbe&extParamId=aHR0cDovL3d3dy5nZW9wb3J0YWlsLmdvdXYuZnIvYWNjdWVpbD9jPTYuOTk5NTAxODA2MTgyMTg2LDQ2LjA0MDk2NDIyNDYyMjYxJno9MC4wMDAxNzE2NjEzNzY5NTkzNzE2OCZsPU9SVEhPSU1BR0VSWS5PUlRIT1BIT1RPUzo6R0VPUE9SVEFJTDpPR0M6V01UUygxKSZsPVNXSVNTLVBJWEVMS0FSVEU6OkdFT1BPUlRBSUw6T0dDOldNUygxKSZkPTkwMzAxOSgxKSZwZXJtYWxpbms9eWVz

produces:

[Wed Aug 12 11:25:14 2015] [error] [client 10.220.5.136] Traceback (most recent call last): [Wed Aug 12 11:25:14 2015] [error] [client 10.220.5.136] File "/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/MapProxy-1.7.0-py2.7.egg/mapproxy/wsgiapp.py", line 181, in call [Wed Aug 12 11:25:14 2015] [error] [client 10.220.5.136] resp = self.handlers[handler_name].handle(req) [Wed Aug 12 11:25:14 2015] [error] [client 10.220.5.136] File "/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/MapProxy-1.7.0-py2.7.egg/mapproxy/service/ows.py", line 38, in handle [Wed Aug 12 11:25:14 2015] [error] [client 10.220.5.136] return self.services[service].handle(req) [Wed Aug 12 11:25:14 2015] [error] [client 10.220.5.136] File "/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/MapProxy-1.7.0-py2.7.egg/mapproxy/service/base.py", line 30, in handle [Wed Aug 12 11:25:14 2015] [error] [client 10.220.5.136] return handler(parsed_req) [Wed Aug 12 11:25:14 2015] [error] [client 10.220.5.136] File "/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/MapProxy-1.7.0-py2.7.egg/mapproxy/service/wms.py", line 199, in featureinfo [Wed Aug 12 11:25:14 2015] [error] [client 10.220.5.136] query = InfoQuery(p.bbox, p.size, SRS(p.srs), p.pos, [Wed Aug 12 11:25:14 2015] [error] [client 10.220.5.136] File "/var/www/vhosts/mf-chsdi3/private/chsdi/buildout/eggs/MapProxy-1.7.0-py2.7.egg/mapproxy/request/wms/init.py", line 404, in _get_pos [Wed Aug 12 11:25:14 2015] [error] [client 10.220.5.136] return int(self['x']), int(self['y']) [Wed Aug 12 11:25:14 2015] [error] [client 10.220.5.136] ValueError: invalid literal for int() with base 10: '316.45'

cedricmoullet commented 9 years ago

@procrastinatio any chance that MapProxy avoids to make a 500 when asking for a GetFeatureInfo (which is obviously not supported) ?

procrastinatio commented 9 years ago

No layer in the GetCapabilities is queryableso client should not even try to make GetFeatureInfoqueries.

Otherwise

1/ Let apache check the query string for GetFeatureInfoand return a 403 Forbidden

2/ Extend the mapproxy NoContentMiddleware with mapproxy's WSGI Filter Middleware and check for illegaloperation.