Ignore:
Timestamp:
Mar 30, 2015, 2:42:31 PM (7 years ago)
Author:
djay
Message:

Fix issue with OTB multiple inputs potentially encoded in base64.

File:
1 edited

Legend:

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

    r618 r619  
    30173017      addToMap(cursor->content,"size",sizes);
    30183018    }
     3019    map* length=getMap(cursor->content,"length");
     3020    if(length!=NULL){
     3021      int len=atoi(length->value);
     3022      for(int i=1;i<len;i++){
     3023        tmp=getMapArray(cursor->content,"encoding",i);
     3024        if(tmp!=NULL && strncasecmp(tmp->value,"base64",6)==0){
     3025          char key[17];
     3026          sprintf(key,"base64_value_%d",i);
     3027          tmp=getMapArray(cursor->content,"value",i);
     3028          addToMap(cursor->content,key,tmp->value);
     3029          int size=0;
     3030          char *s=strdup(tmp->value);
     3031          free(tmp->value);
     3032          tmp->value=base64d(s,strlen(s),&size);
     3033          free(s);
     3034          char sizes[1024];
     3035          sprintf(sizes,"%d",size);
     3036          sprintf(key,"size_%d",i);
     3037          addToMap(cursor->content,key,sizes);
     3038        }
     3039      }
     3040    }
    30193041    cursor=cursor->next;
    30203042  }
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