Changeset 825 for trunk/zoo-project


Ignore:
Timestamp:
May 17, 2017, 2:48:33 PM (3 years ago)
Author:
djay
Message:

Fix issue reported on the mailing list for downloading file depending on the format of the Cookie returned by the server.

File:
1 edited

Legend:

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

    r820 r825  
    8282  if(strncmp("Set-Cookie: ",(char*)buffer,12)==0){
    8383    int i;
    84     char env[256];
    85     char path[256];
    86     char domain[256];
    8784    char* tmp;
    8885    for(i=0;i<12;i++)
     
    9289        ;
    9390#endif
    94     sscanf((char*)buffer,"%s; path=%s; domain=%s",env,path,domain);
    9591    _HINTERNET *psInternet=(_HINTERNET *)data;
     92    tmp=strtok(buffer,";");
     93    if(tmp!=NULL){
     94      sprintf(CCookie[psInternet->id],"%s",tmp);
     95    }
    9696    tmp=strcat(env,CCookie[psInternet->id][0]);
    97 #ifdef MSG_LAF_OUT
    98     printf("\n**Cookie env : [%s] , path : [%s], domain : [%s]**\n",env,path,domain);
    99     printf("buffer : %d (%s) (%s) (%s)\n",(buffer==NULL),buffer,tmp,CCookie);
    100 #endif
    101     strcpy(CCookie[psInternet->id][0],tmp);
    10297  }
    10398  return size * nmemb;//write_data_into(buffer,size,nmemb,data,HEADER);
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