Changeset 500


Ignore:
Timestamp:
Sep 1, 2014, 9:30:41 AM (10 years ago)
Author:
djay
Message:

Fix issue reported on mailing list about base64 encoding.

File:
1 edited

Legend:

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

    r492 r500  
    19131913
    19141914        xmlAddChild(nc3,xmlNewText(BAD_CAST base64(tmp3->value, atoi(rs->value))));
     1915        if(tmp1==NULL || (tmp1!=NULL && strncmp(tmp1->value,"base64",6)!=0))
     1916          xmlNewProp(nc3,BAD_CAST "encoding",BAD_CAST "base64");
    19151917        if(!isSized){
    19161918          freeMap(&rs);
     
    23052307        free(file_name);
    23062308        free(file_url);
    2307       }
     2309        }
    23082310#ifdef USE_MS
    23092311      else{
     
    24202422  bmem = BIO_new(BIO_s_mem());
    24212423  b64 = BIO_push(b64, bmem);
    2422   BIO_write(b64, input, length);
     2424  BIO_write(b64, input, length+1);
    24232425  BIO_flush(b64);
    24242426  BIO_get_mem_ptr(b64, &bptr);
    24252427
    2426   char *buff = (char *)malloc((bptr->length)*sizeof(char));
    2427   memcpy(buff, bptr->data, bptr->length-1);
     2428  char *buff = (char *)malloc((bptr->length+1)*sizeof(char));
     2429  memcpy(buff, bptr->data, bptr->length);
    24282430  buff[bptr->length-1] = 0;
    24292431
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