Ignore:
Timestamp:
Sep 2, 2011, 11:20:31 PM (4 years ago)
Author:
djay
Message:

Add the multi-part request support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/zoo_loader.c

    r329 r331  
    7676#endif
    7777
     78  char *strQuery=strdup(cgiQueryString);
    7879  map* tmpMap=NULL;
    7980
     
    107108        buffer[cgiContentLength]=0;
    108109        tmpMap=createMap("request",buffer);
     110        fprintf(stderr,"%s\n",tmpMap->value);
    109111      }else{
    110112        buffer[0]=0;
     
    141143  }
    142144  else{
     145    dumpMap(tmpMap);
    143146    char **array, **arrayStep;
    144147    if (cgiFormEntries(&array) != cgiFormSuccess) {
     
    179182     */
    180183    map* t1=getMap(tmpMap,"request");
    181     if(t1!=NULL){
     184    if(t1!=NULL && strncasecmp(t1->value,"<",1)==0){
    182185      addToMap(tmpMap,"xrequest",t1->value);
    183186      xmlInitParser();
     
    281284      xmlFreeDoc(doc);
    282285      xmlCleanupParser();
     286    }else{
     287      freeMap(&tmpMap);
     288      free(tmpMap);
     289      tmpMap=createMap("not_valid","true");
    283290    }
    284291
     
    297304        token1=strtok_r(NULL,"=",&saveptr1);
    298305      }
    299       if(strcasecmp(name,"metapath")==0)
    300         addToMap(tmpMap,name,value);
     306      addToMap(tmpMap,name,value);
    301307      free(name);
    302308      free(value);
     309      name=NULL;
     310      value=NULL;
    303311      token=strtok_r(NULL,"&",&saveptr);
    304312    }
    305313   
    306314  }
     315
     316
     317  if(strncasecmp(cgiContentType,"multipart/form-data",19)==0){
     318      map* tmp=getMap(tmpMap,"dataInputs");
     319      if(tmp!=NULL){
     320        addToMap(tmpMap,"dataInputs",strstr(strQuery,"dataInputs=")+11);
     321      }
     322    }
    307323
    308324  runRequest(tmpMap);
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png