Index: /gsdl/trunk/src/oaiservr/abstractlistaction.cpp
===================================================================
--- /gsdl/trunk/src/oaiservr/abstractlistaction.cpp	(revision 15197)
+++ /gsdl/trunk/src/oaiservr/abstractlistaction.cpp	(revision 15198)
@@ -6,4 +6,21 @@
 bool abstractlistaction::validateAction(recptproto *protocol, oaiargs &params, int &numArgs)
 { 
+  // Remove any parameters that aren't valid for this action
+  text_tmap::const_iterator param_iterator = params.begin();
+  while (param_iterator != params.end())
+  {
+    if (param_iterator->first != "verb" &&
+	param_iterator->first != "from" &&
+	param_iterator->first != "until" &&
+	param_iterator->first != "set" &&
+	param_iterator->first != "resumptionToken" &&
+	param_iterator->first != "metadataPrefix")
+    {
+      params.erase(param_iterator->first);
+    }
+
+    param_iterator++;
+  }
+
   text_t from  = params["from"];
   text_t until = params["until"];
@@ -19,10 +36,10 @@
     if(from.size() != 10){
       this->errorType = "badArgument";
-      return false;
+      params.erase("from");
     }
     else{
       if(from[4] != '-' || from[7] != '-'){
 	this->errorType = "badArgument";
-	return false;
+	params.erase("from");
       }
     }
@@ -34,13 +51,18 @@
     if(until.size() != 10){
       this->errorType = "badArgument";
-      return false;
+      params.erase("until");
     }
     else{
       if(until[4] != '-' || until[7] != '-'){
 	this->errorType = "badArgument";
-	return false;
+	params.erase("until");
       }
     }
     ++numArgs; // Increase valid args count
+  }
+
+  if (this->errorType == "badArgument")
+  {
+    return false;
   }
 
Index: /gsdl/trunk/src/oaiservr/identityaction.cpp
===================================================================
--- /gsdl/trunk/src/oaiservr/identityaction.cpp	(revision 15197)
+++ /gsdl/trunk/src/oaiservr/identityaction.cpp	(revision 15198)
@@ -4,8 +4,21 @@
 bool identityaction::validateAction(recptproto *protocol, oaiargs &params)
 { 
+  int params_size = params.getSize();
+
+  // Remove any parameters that aren't valid for this action
+  text_tmap::const_iterator param_iterator = params.begin();
+  while (param_iterator != params.end())
+  {
+    if (param_iterator->first != "verb")
+    {
+      params.erase(param_iterator->first);
+    }
+
+    param_iterator++;
+  }
+  
   //"Verb=Identify" should be the only parameter - if there are others, throw an error.
   // Don't need to check that the param we have is "Verb=Identify", as it has to be to get to here.
-  
-  if(params.getSize() != 1){
+  if(params_size != 1){
     this->errorType = "badArgument";
     return false;
Index: /gsdl/trunk/src/oaiservr/listidsaction.cpp
===================================================================
--- /gsdl/trunk/src/oaiservr/listidsaction.cpp	(revision 15197)
+++ /gsdl/trunk/src/oaiservr/listidsaction.cpp	(revision 15198)
@@ -7,4 +7,5 @@
 bool listidsaction::validateAction(recptproto *protocol, oaiargs &params)
 { 
+  int params_size = params.getSize();
   int numArgs  = 1; // For "verb" arg
 
@@ -15,5 +16,5 @@
   // In OAI v1.1 metadataPrefix is not allowed.
   if (this->configuration->getOAIVersion() <= 110){
-    if(numArgs != params.getSize()){
+    if(numArgs != params_size){
       this->errorType = "badArgument";
       return false;
@@ -27,5 +28,5 @@
     }
     else { // If it isn't empty, increase the valid args count and compare this to the total num of args
-      if (++numArgs != params.getSize()){
+      if (++numArgs != params_size){
 	this->errorType = "badArgument";
 	return false;
Index: /gsdl/trunk/src/oaiservr/listrecsaction.cpp
===================================================================
--- /gsdl/trunk/src/oaiservr/listrecsaction.cpp	(revision 15197)
+++ /gsdl/trunk/src/oaiservr/listrecsaction.cpp	(revision 15198)
@@ -6,4 +6,6 @@
 bool listrecsaction::validateAction(recptproto *protocol, oaiargs &params)
 { 
+  int params_size = params.getSize();
+
   text_t meta    = params["metadataPrefix"];
   int    numArgs = 1;                // 1st arg (Verb=ListRecords) must be present for us to be here
@@ -26,5 +28,5 @@
   // The number of valid args should be exactly equal to the number of args actually there.
   // If not, throw a 'badArgument' error.
-  if (numArgs != params.getSize()) {
+  if (numArgs != params_size) {
     this->errorType = "badArgument";
     return false;
Index: /gsdl/trunk/src/oaiservr/listsetsaction.cpp
===================================================================
--- /gsdl/trunk/src/oaiservr/listsetsaction.cpp	(revision 15197)
+++ /gsdl/trunk/src/oaiservr/listsetsaction.cpp	(revision 15198)
@@ -11,5 +11,20 @@
 
 bool listsetsaction::validateAction(recptproto *protocol, oaiargs &params)
-{ if(params.getSize() != 1){
+{
+  int params_size = params.getSize();
+
+  // Remove any parameters that aren't valid for this action
+  text_tmap::const_iterator param_iterator = params.begin();
+  while (param_iterator != params.end())
+  {
+    if (param_iterator->first != "verb")
+    {
+      params.erase(param_iterator->first);
+    }
+
+    param_iterator++;
+  }
+
+  if(params_size != 1){
     this->errorType = "badArgument";
     return false;
Index: /gsdl/trunk/src/oaiservr/metaformatsaction.cpp
===================================================================
--- /gsdl/trunk/src/oaiservr/metaformatsaction.cpp	(revision 15197)
+++ /gsdl/trunk/src/oaiservr/metaformatsaction.cpp	(revision 15198)
@@ -5,4 +5,19 @@
 bool metaformatsaction::validateAction(recptproto *protocol, oaiargs &params)
 { 
+  int params_size = params.getSize();
+
+  // Remove any parameters that aren't valid for this action
+  text_tmap::const_iterator param_iterator = params.begin();
+  while (param_iterator != params.end())
+  {
+    if (param_iterator->first != "verb" &&
+	param_iterator->first != "identifier")
+    {
+      params.erase(param_iterator->first);
+    }
+
+    param_iterator++;
+  }
+
   int numArgs = 1; // the number of expected arguments
   
@@ -15,5 +30,5 @@
   // If the total number of params isn't equal to the number of valid
   // args (i.e. we have an arg but it isn't the identifier), throw an error  
-  if((params.getSize() != numArgs)){
+  if((params_size != numArgs)){
     this->errorType = "badArgument";
     return false;
Index: /gsdl/trunk/src/oaiservr/recordaction.cpp
===================================================================
--- /gsdl/trunk/src/oaiservr/recordaction.cpp	(revision 15197)
+++ /gsdl/trunk/src/oaiservr/recordaction.cpp	(revision 15198)
@@ -29,5 +29,22 @@
 
 bool recordaction::validateAction(recptproto *protocol, oaiargs &params)
-{ text_t meta = params["metadataPrefix"];
+{
+  int params_size = params.getSize();
+
+  // Remove any parameters that aren't valid for this action
+  text_tmap::const_iterator param_iterator = params.begin();
+  while (param_iterator != params.end())
+  {
+    if (param_iterator->first != "verb" &&
+	param_iterator->first != "identifier" &&
+	param_iterator->first != "metadataPrefix")
+    {
+      params.erase(param_iterator->first);
+    }
+
+    param_iterator++;
+  }
+
+  text_t meta = params["metadataPrefix"];
   text_t gsdlId = params["identifier"];
   text_t gsdlCollect;
@@ -37,5 +54,5 @@
   // The identifier and metadataPrefix args MUST be supplied, and are the only 
   // args allowed (excluding verb arg). If we don't have them, throw an error.
-  if(gsdlId == "" || meta == "" || params.getSize() != 3){
+  if(gsdlId == "" || meta == "" || params_size != 3){
     this->errorType = "badArgument";
     return false;
