Ignore:
Timestamp:
Feb 26, 2015, 11:53:34 AM (9 years ago)
Author:
knut
Message:

Implemented default result file extensions for many MIME types, based on Apache's mime.types list. Added file mimetypes.h. Made function printIOType more general with respect to media content. Rewrote the XML parsing of the <ResponseDocument?> block in Execute requests to fix problem caused by one output variable inheriting properties from another. Minor memory allocation modification in zoo_loader.c.

File:
1 edited

Legend:

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

    r587 r601  
    8484  fflush(stderr);
    8585#endif
    86 
    8786 
    8887  char *strQuery=NULL;
     
    134133          char *ivalue=new char[cgiContentLength];
    135134          cgiFormStringNoNewlines(*arrayStep, ivalue, cgiContentLength);
    136           char* tmpValueFinal=(char*) malloc((strlen(*arrayStep)+strlen(ivalue)+1)*sizeof(char));
     135          char* tmpValueFinal=(char*) malloc((strlen(*arrayStep)+strlen(ivalue)+2)*sizeof(char));       
    137136          sprintf(tmpValueFinal,"%s=%s",*arrayStep,ivalue);
    138           if(strlen(buffer)==0){
     137
     138          if(strlen(buffer)==0){               
    139139            sprintf(buffer,"%s",tmpValueFinal);
    140           }else{
     140          }else{               
    141141            char *tmp=zStrdup(buffer);
    142142            sprintf(buffer,"%s&%s",tmp,tmpValueFinal);
    143143            free(tmp);
    144           }
     144          }       
    145145          free(tmpValueFinal);
    146146#ifdef DEBUG
     
    149149          delete[]ivalue;
    150150          arrayStep++;
    151         }
     151        }       
    152152        if(tmpMap!=NULL)
    153153          addToMap(tmpMap,"request",buffer);
     
    156156      }
    157157      delete[]buffer;
    158     }
     158    }   
    159159  }
    160160  else{
     
    344344          value=zStrdup(token1);
    345345        token1=strtok_r(NULL,"=",&saveptr1);
    346       }
     346      }   
    347347      //addToMap(tmpMap,name,value);
    348348          /* knut: strtok(_r) ignores delimiter bytes at start and end of string;
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