Opened 16 years ago

Closed 16 years ago

#2521 closed defect (fixed)

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 (12)

comment:1 by tomkralidis, 16 years ago

Fixed in r7393:

Norm: can you check and verify?

in reply to:  1 ; comment:2 by nsavard, 16 years ago

Replying to tomkralidis:

Fixed in r7393:

Norm: can you check and verify?

I'll recompile and check.

in reply to:  2 ; comment:3 by nsavard, 16 years ago

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 ; comment:4 by tomkralidis, 16 years ago

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 comment:5 by nsavard, 16 years ago

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

comment:6 by tomkralidis, 16 years ago

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?

comment:7 by dmorissette, 16 years ago

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.

comment:8 by tomkralidis, 16 years ago

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

in reply to:  8 ; comment:9 by nsavard, 16 years ago

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 comment:10 by nsavard, 16 years ago

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.

comment:11 by nsavard, 16 years ago

Tom: Very good this is fixed.

comment:12 by tomkralidis, 16 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.