Changeset 329 for trunk/zoo-project


Ignore:
Timestamp:
Aug 29, 2011, 11:01:40 PM (13 years ago)
Author:
djay
Message:

Store metapath even for POST requests. Correct load of js when metapath was used.

Location:
trunk/zoo-project/zoo-kernel
Files:
2 edited

Legend:

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

    r328 r329  
    103103   * Load the first part of the ZOO-API
    104104   */
    105   char api0[strlen(tmpm1->value)+strlen(ntmp)+15];
    106   sprintf(api0,"%s/%sZOO-proj4js.js",ntmp,tmpm1->value);
     105  char api0[strlen(tmpm1->value)+strlen(ntmp)+16];
     106  sprintf(api0,"%s/%s/ZOO-proj4js.js",ntmp,tmpm1->value);
    107107#ifdef JS_DEBUG
    108108  fprintf(stderr,"Trying to load %s\n",api0);
     
    112112
    113113  char api1[strlen(tmpm1->value)+strlen(ntmp)+11];
    114   sprintf(api1,"%s/%sZOO-api.js",ntmp,tmpm1->value);
     114  sprintf(api1,"%s/%s/ZOO-api.js",ntmp,tmpm1->value);
    115115#ifdef JS_DEBUG
    116116  fprintf(stderr,"Trying to load %s\n",api1);
     
    126126  map* tmpm2=getMap(s->content,"serviceProvider");
    127127
    128   char filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+2];
    129   sprintf(filename,"%s/%s%s",ntmp,tmpm1->value,tmpm2->value);
    130   filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+1]=0;
     128  char filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+3];
     129  sprintf(filename,"%s/%s/%s",ntmp,tmpm1->value,tmpm2->value);
     130  filename[strlen(tmpm1->value)+strlen(tmpm2->value)+strlen(ntmp)+2]=0;
    131131#ifdef JS_DEBUG
    132132  fprintf(stderr,"FILENAME %s\n",filename);
  • trunk/zoo-project/zoo-kernel/zoo_loader.c

    r296 r329  
    282282      xmlCleanupParser();
    283283    }
     284
     285    char *token,*saveptr;
     286    token=strtok_r(cgiQueryString,"&",&saveptr);
     287    while(token!=NULL){
     288      char *token1,*saveptr1;
     289      char *name=NULL;
     290      char *value=NULL;
     291      token1=strtok_r(token,"=",&saveptr1);
     292      while(token1!=NULL){
     293        if(name==NULL)
     294          name=strdup(token1);
     295        else
     296          value=strdup(token1);
     297        token1=strtok_r(NULL,"=",&saveptr1);
     298      }
     299      if(strcasecmp(name,"metapath")==0)
     300        addToMap(tmpMap,name,value);
     301      free(name);
     302      free(value);
     303      token=strtok_r(NULL,"&",&saveptr);
     304    }
     305   
    284306  }
    285307
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