Ignore:
Timestamp:
2008-04-17T13:52:05+12:00 (16 years ago)
Author:
mdewsnip
Message:

Now each action checks for invalid arguments in the params structure and deletes any that aren't valid, so they don't get into the "<request>" tag in the resulting XML and cause OAI validation errors. By DL Consulting Ltd.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/src/oaiservr/identityaction.cpp

    r15193 r15198  
    44bool identityaction::validateAction(recptproto *protocol, oaiargs &params)
    55{
     6  int params_size = params.getSize();
     7
     8  // Remove any parameters that aren't valid for this action
     9  text_tmap::const_iterator param_iterator = params.begin();
     10  while (param_iterator != params.end())
     11  {
     12    if (param_iterator->first != "verb")
     13    {
     14      params.erase(param_iterator->first);
     15    }
     16
     17    param_iterator++;
     18  }
     19 
    620  //"Verb=Identify" should be the only parameter - if there are others, throw an error.
    721  // Don't need to check that the param we have is "Verb=Identify", as it has to be to get to here.
    8  
    9   if(params.getSize() != 1){
     22  if(params_size != 1){
    1023    this->errorType = "badArgument";
    1124    return false;
Note: See TracChangeset for help on using the changeset viewer.