Ignore:
Timestamp:
Dec 28, 2012, 12:41:25 AM (12 years ago)
Author:
djay
Message:

Fix issue when passing Inputs Reference in POST request.

File:
1 edited

Legend:

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

    r380 r381  
    8383#endif
    8484
    85   char *strQuery=strdup(cgiQueryString);
     85 
     86  char *strQuery=NULL;
     87  if(cgiQueryString!=NULL)
     88    strQuery=strdup(cgiQueryString);
    8689  map* tmpMap=NULL;
    8790
     
    9396       char *res=NULL;
    9497       int r=0;
    95        while(r=fread(buffer,sizeof(char),1,cgiIn)){
     98       while((r=fread(buffer,sizeof(char),1,cgiIn))){
    9699         cgiContentLength+=r;
    97100         if(res==NULL){
     
    115118      char *buffer=new char[cgiContentLength+1];
    116119      int r=0;
    117       if((r=fread(buffer,sizeof(char),cgiContentLength,cgiIn))!=0){
     120      if(fread(buffer,sizeof(char),cgiContentLength,cgiIn)>=0){
    118121        buffer[cgiContentLength]=0;
    119122        tmpMap=createMap("request",buffer);
     
    196199      xmlDocPtr doc = xmlParseMemory(t1->value,cgiContentLength);
    197200
    198 
    199201      {
    200202        xmlXPathObjectPtr reqptr=extractFromDoc(doc,"/*[local-name()='Envelope']/*[local-name()='Body']/*");
     
    244246          xmlXPathFreeObject(reqptr);
    245247        }
    246         //xmlFree(req);
    247248      }
    248249      if(strncasecmp(t1->value,"GetCapabilities",15)==0){
     
    252253        addToMap(tmpMap,"version",(char*)content);
    253254        xmlXPathFreeObject(versptr);
    254         //xmlFree(vers);
    255255        xmlFree(content);
    256256      }else{
     
    259259        if(tval!=NULL)
    260260          addToMap(tmpMap,"version",tval);
    261         xmlFree(tval);
    262261        tval = (char*) xmlGetProp(cur,BAD_CAST "language");
    263262        if(tval!=NULL)
     
    287286          }
    288287        }
    289         //xmlFree(id);
    290       }
    291       xmlFree(tval);
     288      }
    292289      xmlFreeDoc(doc);
    293290      xmlCleanupParser();
     
    329326  }
    330327
     328  if(strQuery!=NULL)
     329    free(strQuery);
    331330  runRequest(tmpMap);
    332331
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