[mapserver-commits] r10995 - trunk/mapserver/mapscript/swiginc
svn at osgeo.org
svn at osgeo.org
Wed Feb 16 16:18:56 EST 2011
Author: warmerdam
Date: 2011-02-16 13:18:56 -0800 (Wed, 16 Feb 2011)
New Revision: 10995
Modified:
trunk/mapserver/mapscript/swiginc/owsrequest.i
Log:
add loadParamsFromURL()
Modified: trunk/mapserver/mapscript/swiginc/owsrequest.i
===================================================================
--- trunk/mapserver/mapscript/swiginc/owsrequest.i 2011-02-16 21:18:28 UTC (rev 10994)
+++ trunk/mapserver/mapscript/swiginc/owsrequest.i 2011-02-16 21:18:56 UTC (rev 10995)
@@ -32,6 +32,19 @@
*/
+%{
+static char *msGetEnvURL( const char *key, void *thread_context )
+{
+ if( strcmp(key,"REQUEST_METHOD") == 0 )
+ return "GET";
+
+ if( strcmp(key,"QUERY_STRING") == 0 )
+ return (char *) thread_context;
+
+ return NULL;
+}
+%}
+
%rename(OWSRequest) cgiRequestObj;
%include "../../cgiutil.h"
@@ -80,6 +93,12 @@
return self->NumParams;
}
+ int loadParamsFromURL( const char *url )
+ {
+ self->NumParams = loadParams( self, msGetEnvURL, NULL, 0, (void*)url );
+ return self->NumParams;
+ }
+
void setParameter(char *name, char *value)
{
int i;
More information about the mapserver-commits
mailing list