Ignore:
Timestamp:
Jan 27, 2011, 11:47:22 PM (13 years ago)
Author:
djay
Message:

Give ZOO-Services capabilities to return a Cookie to the client and to store persistent informations, using senv maps in main_conf, on the server side. Bug fix in addDefaultValues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-kernel/zoo_service_loader.c

    r88 r92  
    16221622   * Ensure that each requested arguments are present in the request
    16231623   * DataInputs and ResponseDocument / RawDataOutput
    1624    */ 
     1624   */
    16251625  char *dfv=addDefaultValues(&request_input_real_format,s1->inputs,m,0);
    16261626  if(strcmp(dfv,"")!=0){
     
    17391739  _tmpMaps->next=NULL;
    17401740  addToMap(_tmpMaps->content,"status","0");
     1741  if(cgiCookie!=NULL && strlen(cgiCookie)>0){
     1742    addToMap(_tmpMaps->content,"sessid",strstr(cgiCookie,"=")+1);
     1743    char session_file_path[1024];
     1744    map *tmpPath=getMapFromMaps(m,"main","sessPath");
     1745    if(tmpPath==NULL)
     1746      tmpPath=getMapFromMaps(m,"main","tmpPath");
     1747    sprintf(session_file_path,"%s/sess_%s.cfg",tmpPath->value,strstr(cgiCookie,"=")+1);
     1748    maps *tmpSess=(maps*)calloc(1,MAPS_SIZE);
     1749    struct stat file_status;
     1750    int istat = stat(session_file_path, &file_status);
     1751    if(istat==0){
     1752      conf_read(session_file_path,tmpSess);
     1753      dumpMaps(tmpSess);
     1754      addMapsToMaps(&m,tmpSess);
     1755      freeMaps(&tmpSess);
     1756    }
     1757    free(tmpSess);
     1758  }
    17411759  addMapsToMaps(&m,_tmpMaps);
    17421760  freeMaps(&_tmpMaps);
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