Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
re-enabled PyQgsServer, reverted setenv
  • Loading branch information
elpaso committed Jul 3, 2015
1 parent 11a7522 commit 132fa0d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -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

1 change: 1 addition & 0 deletions src/server/qgsserver.cpp
Expand Up @@ -396,6 +396,7 @@ bool QgsServer::init( int & argc, char ** argv )

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

Expand Down
18 changes: 9 additions & 9 deletions tests/testdata/qgis_server/getcapabilities.txt
@@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -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>
Expand Down

4 comments on commit 132fa0d

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@elpaso
Copy link
Contributor Author

@elpaso elpaso commented on 132fa0d Jul 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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
Copy link
Contributor Author

@elpaso elpaso commented on 132fa0d Jul 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@elpaso
Copy link
Contributor Author

@elpaso elpaso commented on 132fa0d Jul 7, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.