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/service_internal.c

    r88 r92  
    15761576    asRaw=1;
    15771577 
     1578  map *_tmp=getMapFromMaps(m,"lenv","cookie");
     1579  if(_tmp!=NULL){
     1580    printf("Set-Cookie: %s\r\n",_tmp->value);
     1581    maps *tmpSess=getMaps(m,"senv");
     1582    if(tmpSess!=NULL){
     1583      char session_file_path[1024];
     1584      map *tmpPath=getMapFromMaps(m,"main","sessPath");
     1585      if(tmpPath==NULL)
     1586        tmpPath=getMapFromMaps(m,"main","tmpPath");
     1587      char *tmp1=strtok(_tmp->value,";");
     1588      if(tmp1!=NULL)
     1589        sprintf(session_file_path,"%s/sess_%s.cfg",tmpPath->value,strstr(tmp1,"=")+1);
     1590      else
     1591        sprintf(session_file_path,"%s/sess_%s.cfg",tmpPath->value,strstr(_tmp->value,"=")+1);
     1592      FILE* file=fopen(session_file_path,"w");
     1593      dumpMapsToFile(tmpSess,file);
     1594      fclose(file);
     1595    }
     1596  }
    15781597  if(asRaw==0){
    15791598#ifdef DEBUG
     
    18611880      iotype* tmpIoType=getIoTypeFromElement(tmpInputs,tmpInputs->name,
    18621881                                             tmpMaps->content);
    1863       addToMap(tmpMaps->content,"inRequest","true");
    18641882      if(type==0) {
    18651883        /**
     
    19241942        }
    19251943      }
     1944      if(tmpMaps->content==NULL)
     1945        tmpMaps->content=createMap("inRequest","true");
     1946      else
     1947        addToMap(tmpMaps->content,"inRequest","true");
    19261948    }
    19271949    tmpInputs=tmpInputs->next;
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