Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[server] Fixes Post element in WFS GetCapabilities doc #7461

Merged
merged 3 commits into from Jul 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/server/services/wfs/qgswfsgetcapabilities.cpp
Expand Up @@ -331,11 +331,13 @@ namespace QgsWfs
QDomElement dcpElement = doc.createElement( QStringLiteral( "ows:DCP" ) );
QDomElement httpElement = doc.createElement( QStringLiteral( "ows:HTTP" ) );
QDomElement getElement = doc.createElement( QStringLiteral( "ows:Get" ) );
getElement.setAttribute( QStringLiteral( "xlink:type" ), QStringLiteral( "xlink:simple" ) );
getElement.setAttribute( QStringLiteral( "xlink:href" ), hrefString );
QDomElement postElement = getElement.cloneNode().toElement();
httpElement.appendChild( getElement );

QDomElement postElement = doc.createElement( QStringLiteral( "ows:Post" ) );
postElement.setAttribute( QStringLiteral( "xlink:href" ), hrefString );
httpElement.appendChild( postElement );

dcpElement.appendChild( httpElement );
operationElement.appendChild( dcpElement );

Expand Down
16 changes: 8 additions & 8 deletions tests/testdata/qgis_server/wfs_getcapabilities.txt
Expand Up @@ -20,8 +20,8 @@ Content-Type: text/xml; charset=utf-8
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Post xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
</ows:HTTP>
</ows:DCP>
<ows:Parameter name="service">
Expand All @@ -38,8 +38,8 @@ Content-Type: text/xml; charset=utf-8
<ows:Operation name="DescribeFeatureType">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Post xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
</ows:HTTP>
</ows:DCP>
<ows:Parameter name="outputFormat">
Expand All @@ -51,8 +51,8 @@ Content-Type: text/xml; charset=utf-8
<ows:Operation name="GetFeature">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Post xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
</ows:HTTP>
</ows:DCP>
<ows:Parameter name="outputFormat">
Expand All @@ -68,8 +68,8 @@ Content-Type: text/xml; charset=utf-8
<ows:Operation name="Transaction">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:type="xlink:simple" xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Get xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
<ows:Post xlink:href="?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_wfs.qgs"/>
</ows:HTTP>
</ows:DCP>
<ows:Parameter name="inputFormat">
Expand Down