Ignore:
Timestamp:
Feb 18, 2015, 1:31:59 PM (9 years ago)
Author:
knut
Message:

Implemented asynchronous HTTP POST Execute requests on Windows platform (via caching). Fixed bug that caused only the last output variable in a HTTP POST Execute request to be returned. Modified the addToCache function so that the path of the cached file can be retrieved. Changed the parsing of KVPs in zoo_loader.c so that keys with missing values (e.g. "metapath=") are assigned the empty string instead of NULL (avoids segmentation fault in some situations). Added conditional definition of ZEND_DEBUG in service_internal_php.c. Deallocation of memory in function createProcess. In zoo_loader.c, applied url_decode to CGI form string (WIN32 only, but should check if this should apply to other platforms as well).

File:
1 edited

Legend:

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

    r554 r587  
    173173      fprintf(stderr,"(( \n %s \n %s \n ))",*arrayStep,value);
    174174#endif
     175#ifdef WIN32
     176      char* tmp = url_decode(value);
     177      if(tmpMap!=NULL)         
     178        addToMap(tmpMap,*arrayStep,tmp);
     179      else             
     180        tmpMap=createMap(*arrayStep,tmp);
     181      free(tmp);
     182#else
    175183      if(tmpMap!=NULL)
    176         addToMap(tmpMap,*arrayStep,value);
     184        addToMap(tmpMap,*arrayStep,value);
    177185      else
    178         tmpMap=createMap(*arrayStep,value);
     186        tmpMap=createMap(*arrayStep,value);
     187#endif 
    179188      arrayStep++;
    180189      delete[]value;
     
    330339      token1=strtok_r(token,"=",&saveptr1);
    331340      while(token1!=NULL){
    332         if(name==NULL)
    333           name=zStrdup(token1);
    334         else
    335           value=zStrdup(token1);
    336         token1=strtok_r(NULL,"=",&saveptr1);
    337       }
    338       addToMap(tmpMap,name,value);
     341        if(name==NULL)
     342          name=zStrdup(token1);
     343        else
     344          value=zStrdup(token1);
     345        token1=strtok_r(NULL,"=",&saveptr1);
     346      }
     347      //addToMap(tmpMap,name,value);
     348          /* knut: strtok(_r) ignores delimiter bytes at start and end of string;
     349           * it will return non-empty string or NULL, e.g. "metapath=" yields value=NULL.
     350           * This modification sets value="" instead of NULL.
     351           */
     352          addToMap(tmpMap,name, value != NULL ? value : "");
     353
    339354      free(name);
    340355      free(value);
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