[mapserver-dev] mapscript OWS request GET/POST

Fabian Schindler fabian.schindler at eox.at
Wed Oct 5 09:45:48 EDT 2011


Hi devs,

I have a petition regarding HTTP request methods.

AFAIK, previously all OWSes (which are also supporting POST) were 
treating requests as GET requests if the request method was not 
explicitly set to MS_POST_REQUEST.

With r12550 we committed a patch to unify OWS requests. We were 
explicitly checking if the request method was MS_GET_REQUEST or 
MS_POST_REQUEST.

It worked well with the msautotests but it broke the mapscript 
implementation unless the request method was explicitly set to 
MS_GET_REQUEST. Apparently the request method in the `OWSRequest` object 
is initially set to an invalid identifier ('-1').

Currently the code is not backwards compatible and is breaking old code 
relying on mapscript, as in our case.



Now my question/proposal:

Should I change the handling of request methods back to "everything that 
is not a POST request is a GET request."?

I would prefer that the request method in the `OWSRequest` defaults to 
MS_GET_REQUEST, since this is normally the default request method.

For the second version I'd add an additional check for any invalid 
request methods.

Thanks,
Fabian


More information about the mapserver-dev mailing list