Skip to content
Permalink
Browse files

re-enabled PyQgsServer, reverted setenv

  • Loading branch information
elpaso committed Jul 2, 2015
1 parent 11a7522 commit 132fa0d25bd5d80edec1d618e1c7765bef9d785b
Showing with 11 additions and 10 deletions.
  1. +1 −1 .travis.yml
  2. +1 −0 src/server/qgsserver.cpp
  3. +9 −9 tests/testdata/qgis_server/getcapabilities.txt
@@ -58,5 +58,5 @@ before_script:
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d qgis_test
- psql -f $TRAVIS_BUILD_DIR/tests/testdata/provider/testdata.sql -U postgres -d qgis_test

script: xvfb-run ctest -V -E 'qgis_openstreetmaptest|qgis_wcsprovidertest|PyQgsServer' -S ../qgis-test-travis.ctest --output-on-failure
script: xvfb-run ctest -V -E 'qgis_openstreetmaptest|qgis_wcsprovidertest' -S ../qgis-test-travis.ctest --output-on-failure

@@ -396,6 +396,7 @@ bool QgsServer::init( int & argc, char ** argv )

QgsEditorWidgetRegistry::initEditors();
mInitialised = TRUE;
QgsMessageLog::logMessage( "Server intialised", "Server", QgsMessageLog::INFO );
return TRUE;
}

@@ -1,8 +1,8 @@
Content-Type: text/xml; charset=utf-8
Content-Length: 4685
Content-Length: 5250

<?xml version="1.0" encoding="utf-8"?>
<WMS_Capabilities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.3" xmlns="http://www.opengis.net/wms" xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd http://www.qgis.org/wms http:?SERVICE=WMS&amp;REQUEST=GetSchemaExtension" xmlns:sld="http://www.opengis.net/sld" xmlns:qgs="http://www.qgis.org/wms">
<WMS_Capabilities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.3" xmlns="http://www.opengis.net/wms" xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd http://www.qgis.org/wms http:?MAP=/home/ale/dev/QGIS/tests/testdata/qgis_server/testproject.qgs&amp;SERVICE=WMS&amp;REQUEST=GetSchemaExtension" xmlns:sld="http://www.opengis.net/sld" xmlns:qgs="http://www.qgis.org/wms">
<Service>
<Name>WMS</Name>
<Title>QGIS TestProject</Title>
@@ -26,7 +26,7 @@ Content-Length: 4685
<DCPType>
<HTTP>
<Get>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?"/>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?MAP=/home/ale/dev/QGIS/tests/testdata/qgis_server/testproject.qgs&amp;"/>
</Get>
</HTTP>
</DCPType>
@@ -41,7 +41,7 @@ Content-Length: 4685
<DCPType>
<HTTP>
<Get>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?"/>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?MAP=/home/ale/dev/QGIS/tests/testdata/qgis_server/testproject.qgs&amp;"/>
</Get>
</HTTP>
</DCPType>
@@ -55,7 +55,7 @@ Content-Length: 4685
<DCPType>
<HTTP>
<Get>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?"/>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?MAP=/home/ale/dev/QGIS/tests/testdata/qgis_server/testproject.qgs&amp;"/>
</Get>
</HTTP>
</DCPType>
@@ -66,7 +66,7 @@ Content-Length: 4685
<DCPType>
<HTTP>
<Get>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?"/>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?MAP=/home/ale/dev/QGIS/tests/testdata/qgis_server/testproject.qgs&amp;"/>
</Get>
</HTTP>
</DCPType>
@@ -76,7 +76,7 @@ Content-Length: 4685
<DCPType>
<HTTP>
<Get>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?"/>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?MAP=/home/ale/dev/QGIS/tests/testdata/qgis_server/testproject.qgs&amp;"/>
</Get>
</HTTP>
</DCPType>
@@ -86,7 +86,7 @@ Content-Length: 4685
<DCPType>
<HTTP>
<Get>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?"/>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?MAP=/home/ale/dev/QGIS/tests/testdata/qgis_server/testproject.qgs&amp;"/>
</Get>
</HTTP>
</DCPType>
@@ -125,7 +125,7 @@ Content-Length: 4685
<Title>default</Title>
<LegendURL>
<Format>image/png</Format>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?SERVICE=WMS&amp;VERSION=1.3&amp;REQUEST=GetLegendGraphic&amp;LAYER=testlayer èé&amp;FORMAT=image/png&amp;STYLE=default"/>
<OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http:?MAP=/home/ale/dev/QGIS/tests/testdata/qgis_server/testproject.qgs&amp;&amp;SERVICE=WMS&amp;VERSION=1.3&amp;REQUEST=GetLegendGraphic&amp;LAYER=testlayer èé&amp;FORMAT=image/png&amp;STYLE=default"/>
</LegendURL>
</Style>
</Layer>

4 comments on commit 132fa0d

@nyalldawson

This comment has been minimized.

Copy link
Collaborator

@nyalldawson nyalldawson replied Jul 5, 2015

@elpaso looks like there's still some issues with this test - see http://dash.orfeo-toolbox.org/testDetails.php?test=31385904&build=189663

@elpaso

This comment has been minimized.

Copy link
Contributor Author

@elpaso elpaso replied Jul 6, 2015

@nyalldawson sorry I cannot reproduce the issue, the test passes locally. That message normally indicates that the request handler got an empty query string, the same problem in the past has been caused by putenv randomly failing to pass the value to the environment, but we have now reverted to setenv which should work consistently.

@elpaso

This comment has been minimized.

Copy link
Contributor Author

@elpaso elpaso replied Jul 6, 2015

@nyalldawson I'm thinking about getting rid of set/put env completely and pass the input directly to the request handler... experimenting...

@elpaso

This comment has been minimized.

Copy link
Contributor Author

@elpaso elpaso replied Jul 7, 2015

@nyalldawson unfortunately I've not found any issue and cannot reproduce the test failure myself. I'm just pretty sure that the failure in the test is caused by QUERY_STRING environment variable not set in:
https://github.com/qgis/QGIS/blob/master/src/server/qgsserver.cpp#L463

Please sign in to comment.
You can’t perform that action at this time.