Closed eleu closed 8 years ago
Can we have an url to see the reponse (your images) / configuration by ourselves ? *An url to an active gmf. Or it's not active anymore ?
Forget my demand. I didn't see the "example"
The example is only showing the GetCapabilities. I have now checked the "public" checkbox in the test-Theme in my instance, which makes the error visible on firebox / dev tools for the example instance on (the protected server of) http://78.155.22.98:81/eleu/mobile
I don't currently know why the execution pass there:
But it seems that this line cause the error: "GetCapabilities from URL %s returns a wrong Content-Type: %s\n%s" % (url, resp.get("content-type"), content)
If I remove it that works (this is currently used to indicate the source of an error, but cause itself an error...)
I search further...
@eleu If it's possible, you will need to configure the response of the server as application/vnd.ogc.wms_xml
and not text/xml
, and the problem will be resolved (except for the poor error message if you don't do that). It is possible ? Or perhaps we should accept responses in text/xml
(@sbrunner ?).
@sbrunner If message can be in text (text/xml
), content should be content.decode('utf-8')
(always in the error string substitution, line 161, in the entry.py (see my previous link)). I leave you do that. I don't know enough the code to know if some more adaptation must be done.
Probably you'll do both to resolve this issue.
(Oh and yes, that in the 2.1 too)
btw, the mapserv_proxy is also returning text/xml
I tried Apache ForceType in apache/qgisserver.conf, but it does not help... http://httpd.apache.org/docs/2.2/mod/core.html#forcetype
In apache/qgisserver.conf.mako, set the following in the
Header set Content-Type "application/vnd.ogc.wms_xml"
I will test now further...
This fixes (at least temporary) the bug.
Thanks for the help @ger-benjamin and @fredj
Nice catch. That's what is expected by the entry.py code. But please, don't close the issue, I think we need at least a better error message...
When one integrates a QGIS layer in GMF 2.0 (and probably also GMF 2.1), the /themes request shows a
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1053: ordinal not in range(128)
error for a _wms_getcap_cached URL get:with the end of the message:
Probably because of a encoding problem because there is a tag with an Umlaut in the GetCapabilites (example)
Probably reproducible with a QGIS layer in GMF Demo.