[mapserver-commits] r12655 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Mon Oct 10 11:53:26 EDT 2011
Author: schpidi
Date: 2011-10-10 08:53:25 -0700 (Mon, 10 Oct 2011)
New Revision: 12655
Modified:
trunk/mapserver/cgiutil.c
trunk/mapserver/mapows.c
Log:
mapscript OWSRequest->type is now initialized with MS_GET_REQUEST.
Added check for request method in msOWSPreParseRequest.
Modified: trunk/mapserver/cgiutil.c
===================================================================
--- trunk/mapserver/cgiutil.c 2011-10-10 12:05:08 UTC (rev 12654)
+++ trunk/mapserver/cgiutil.c 2011-10-10 15:53:25 UTC (rev 12655)
@@ -483,7 +483,7 @@
request->ParamNames = (char **) msSmallMalloc(MS_DEFAULT_CGI_PARAMS*sizeof(char*));
request->ParamValues = (char **) msSmallMalloc(MS_DEFAULT_CGI_PARAMS*sizeof(char*));
request->NumParams = 0;
- request->type = -1;
+ request->type = MS_GET_REQUEST;
request->contenttype = NULL;
request->postrequest = NULL;
request->httpcookiedata = NULL;
Modified: trunk/mapserver/mapows.c
===================================================================
--- trunk/mapserver/mapows.c 2011-10-10 12:05:08 UTC (rev 12654)
+++ trunk/mapserver/mapows.c 2011-10-10 15:53:25 UTC (rev 12655)
@@ -195,6 +195,12 @@
return MS_FAILURE;
#endif /* defined(USE_LIBXML2) */
}
+ else
+ {
+ msSetError(MS_OWSERR, "Unknown request method. Use either GET or POST.",
+ "msOWSPreParseRequest()");
+ return MS_FAILURE;
+ }
/* certain WMS requests do not require the service parameter */
/* see: http://trac.osgeo.org/mapserver/ticket/2531 */
More information about the mapserver-commits
mailing list