opengeospatial / ets-wfs11

Executable Test Suite for WFS 1.1
Other
1 stars 5 forks source link

DescribeFeatureType GET tests fail as Content-Type is evaluated too strict #60

Closed dstenger closed 8 years ago

dstenger commented 8 years ago

Failing tests:

Failure of wfs:wfs-1.1.0-Basic-DescribeFeatureType-tc4:

Test wfs:wfs-1.1.0-Basic-DescribeFeatureType-tc4 type Mandatory default result Passed (s0032/d155e38906_1/d155e636_1/d155e28915_1/d155e4692_1)

Assertion: The MIME returned for a DescribeFeatureType request where no specific output format is requested is
      "text/xml; subtype=gml/3.1.1".

Request d155e5106_1:
   Method: get
   URL: http://test-server?&request=DescribeFeatureType&service=WFS&version=1.1.0
   Response from parser parsers:HTTPParser:
      <response>
   <status code="200" protocol="HTTP/1.1">OK</status>
   <headers>
      <header name="Content-Length">8265</header>
      <header name="Content-Type">text/xml; charset=utf-8; subtype=gml/3.1.1</header>
      <header name="Last-Modified">Tue, 31 May 2016 12:24:25 GMT</header>
      <header name="Server">server</header>
      <header name="X-Powered-By">powered</header>
      <header name="Date">Tue, 31 May 2016 12:24:24 GMT</header>
      <header name="Set-Cookie">cookie</header>
   </headers>
   <content/>
   <!--Response received in [136] milliseconds--></response>

Result: Failed

Failure of wfs:DescribeFeatureType-output-format-gml-3.1.1:

Test wfs:DescribeFeatureType-output-format-gml-3.1.1 type Mandatory default result Passed (s0032/d155e38906_1/d155e636_1/d155e28915_1/d155e4707_1)

Assertion: The MIME returned for a DescribeFeatureType request where the output format requested is &quot;text/xml;
      subtype=gml/3.1.1&quot; is &quot;text/xml; subtype=gml/3.1.1&quot;.

Request d155e6286_1:
   Method: get
   URL: http://test-server?&request=DescribeFeatureType&service=WFS&version=1.1.0&outputformat=text%2Fxml%3B+subtype%3Dgml%2F3.1.1
   Response from parser parsers:HTTPParser:
      <response>
   <status code="200" protocol="HTTP/1.1">OK</status>
   <headers>
      <header name="Content-Length">8265</header>
      <header name="Content-Type">text/xml; charset=utf-8; subtype=gml/3.1.1</header>
      <header name="Last-Modified">Tue, 31 May 2016 12:24:25 GMT</header>
      <header name="Server">server</header>
      <header name="X-Powered-By">powered</header>
      <header name="Date">Tue, 31 May 2016 12:24:24 GMT</header>
      <header name="Set-Cookie">cookie</header>
   </headers>
   <content/>
   <!--Response received in [284] milliseconds--></response>

Result: Failed
dstenger commented 8 years ago

Analysis of bug: Both tests check whether the header Content-Type starts with 'text/xml; subtype=gml/3.1.1'. The tests fail as the test server includes a 'charset=utf-8;' which is not allowed according to the test. The test could be made more lax by just checking if 'text/xml;' and 'subtype=gml/3.1.1' are included in the Content-Type header.

dstenger commented 8 years ago

wfs:wfs-1.1.0-Basic-DescribeFeatureType-tc4 has already been fixed in #57.

dstenger commented 8 years ago

In the next release "wfs:wfs-1.1.0-Basic-DescribeFeatureType-tc4" will pass.

"wfs:DescribeFeatureType-output-format-gml-3.1.1" is still failing.

dstenger commented 8 years ago

We are currently working on the fix.

dstenger commented 8 years ago

"wfs:DescribeFeatureType-output-format-gml-3.1.1" was fixed in pull request #63.

The fix will be part of the next release.

dstenger commented 8 years ago

Fix was successfully tested and merged into master branch. It will be part of the upcoming release.