Ticket #2521 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Sending a post request with a content that does not validate against a schema must trigger an exception

Reported by: nsavard Owned by: tomkralidis
Priority: normal Milestone: 5.2 release
Component: SOS Server Version: svn-trunk (development)
Severity: normal Keywords: OGC,CITE,SOS 1.0.0
Cc: assefa, dmorissette

Description

When a post request is sent to a SOS 1.0.0 server, with a content that does not validate against a schema of a supported operations, must trigger an exception with the code set to InvalidRequest?.

This is a problem similar to bug 2512.

The concerned test is: sos:general-SOS.General-InvalidRequest.1 (s0003)

and the post request is:  http://dev1.lan.mapgears.com/manwe/cgi-bin/mssos100_ogc_cite

with the post content: "Test"

The response from server is (using wget): <HTML> <HEAD><TITLE>MapServer Message</TITLE></HEAD> <!-- MapServer version 5.1-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE --> <BODY BGCOLOR="#FFFFFF"> mapserv(): Web application error. Traditional BROWSE mode requires a TEMPLATE in the WEB section, but none was provided. </BODY></HTML>

Change History

follow-up: ↓ 2   Changed 5 years ago by tomkralidis

Fixed in r7393:

Norm: can you check and verify?

in reply to: ↑ 1 ; follow-up: ↓ 3   Changed 5 years ago by nsavard

Replying to tomkralidis:

Fixed in r7393: Norm: can you check and verify?

I'll recompile and check.

in reply to: ↑ 2 ; follow-up: ↓ 4   Changed 5 years ago by nsavard

Replying to nsavard:

Replying to tomkralidis:

Fixed in r7393: Norm: can you check and verify?

I'll recompile and check.

Tom: It's still failed with the following message. I checked that I have your modifications in my version of MapServer and this is the case.

What tool do you use to send post request?

Message w85aab7b3c11b9b1b1:

FAILURE: The server did not return a response to an invalid request or the response from the server was not a valid exception report. The response from the server was: ""

Message w85aab7b3c11b9b1b3:

Schema file:  http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd

Result: Failed

in reply to: ↑ 3 ; follow-up: ↓ 5   Changed 5 years ago by tomkralidis

Replying to nsavard:

Replying to nsavard:

Replying to tomkralidis:

Fixed in r7393: Norm: can you check and verify?

I'll recompile and check.

Tom: It's still failed with the following message. I checked that I have your modifications in my version of MapServer and this is the case. What tool do you use to send post request? Message w85aab7b3c11b9b1b1: FAILURE: The server did not return a response to an invalid request or the response from the server was not a valid exception report. The response from the server was: "" Message w85aab7b3c11b9b1b3: Schema file:  http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd Result: Failed

Norm: I'm using  http://devgeo.cciw.ca/sos (enter "Test" in the text box and hit "Send".

in reply to: ↑ 4   Changed 5 years ago by nsavard

Replying to tomkralidis:

Norm: I'm using  http://devgeo.cciw.ca/sos (enter "Test" in the text box and hit "Send".

I see that it works with your server. Is it possible for you to send me a copy of this home made script or are they any royalties? I guess it is a CURL script ...

  Changed 5 years ago by tomkralidis

  • cc assefa, dmorissette added

Norm: it's pure client side. Just download  http://devgeo.cciw.ca/sos/sos-test.tgz and run for yourself.

Note that I just tried another approach using:

$ wget --post-data=Test  http://sos_url

..and I got back a regular HTML MapServer error message. This may be what CITE is getting back. However I'm not sure what the difference is between the POST request executed by my small test as opposed to the CITE one, or the wget one for that matter.

cc'ing Assefa and Daniel. Any ideas anyone?

  Changed 5 years ago by dmorissette

Possibly the MIME type of the post data is different between the two cases?

BTW, the mode=ows/MS_MODE=ows solution that I proposed in ticket #2512 could possibly solve this as well by forcing all requests to go through the OWS stuff if mode is set to ows.

follow-up: ↓ 9   Changed 5 years ago by tomkralidis

Norm: now that we advertise POST in GetCapabilities, this should propagate through the CITE tests correctly. Can you try again?

in reply to: ↑ 8 ; follow-up: ↓ 10   Changed 5 years ago by nsavard

Replying to tomkralidis:

Norm: now that we advertise POST in GetCapabilities, this should propagate through the CITE tests correctly. Can you try again?

Tom: I'll try.

in reply to: ↑ 9   Changed 5 years ago by nsavard

Replying to nsavard:

Replying to tomkralidis:

Norm: now that we advertise POST in GetCapabilities, this should propagate through the CITE tests correctly. Can you try again?

Tom: I'll try.

I cannot verify if this issue is solved because the tests engine is down.

  Changed 5 years ago by nsavard

Tom: Very good this is fixed.

  Changed 5 years ago by tomkralidis

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.