Changeset 12400


Ignore:
Timestamp:
2006-08-04T11:48:17+12:00 (18 years ago)
Author:
kjdon
Message:

cgicc stuff, we get the arguments form formData then put them back into a querystring so the rest of the code is still getting the same stuff. Had to add in an encode step so argument values remained encoded cgi_safe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/cgiwrapper.cpp

    r11998 r12400  
    2626#include "gsdlconf.h"
    2727#include "cgiwrapper.h"
     28#include "cgiutils.h"
    2829#include "recptconfig.h"
    2930#include "fileutil.h"
     
    473474  char *aURIStr;
    474475  if (!isfastcgi) {
    475 
    476476   
    477477    // Iterate through the vector, and synthesis argstr
     
    484484      const char* name_cstr = iter->getName().c_str();
    485485      const char* value_cstr = iter->getValue().c_str();
     486      // the args have been decoded and as we are building up the argument
     487      // string again, we need to re encode them
     488      text_t value_textt = cgi_safe(value_cstr);
     489      const char * safe_value_cstr = value_textt.getcstr();
    486490      if (first) {
    487    
    488491    argstr = name_cstr;
    489492    argstr.append("=");
    490     argstr.append(value_cstr);
     493    argstr.append(safe_value_cstr);
    491494    first = false;
    492495      }
     
    495498    argstr.append(name_cstr);
    496499    argstr.append("=");
    497     argstr.append(value_cstr);
     500    argstr.append(safe_value_cstr);
    498501      }
     502      delete [] safe_value_cstr;
    499503    }   
    500504  }
    501 
     505 
    502506  if (debug) {
    503507    cout << "Configuring Greenstone...\n";
Note: See TracChangeset for help on using the changeset viewer.