Ignore:
Timestamp:
Apr 9, 2015, 5:23:06 AM (9 years ago)
Author:
djay
Message:

Major update. Creation of a basic parsing api. Call validateRequest after fork if any.

File:
1 edited

Legend:

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

    r607 r621  
    238238      handle0->ihandle[i].header=NULL;
    239239    }
     240    if(handle.post!=NULL)
     241      free(handle.post);
    240242    free(handle.mimeType);
    241243    handle.mimeType = NULL;
     
    272274  hInternet->ihandle[hInternet->nb].nDataAlloc = 0;
    273275  hInternet->ihandle[hInternet->nb].pabyData = NULL;
     276  hInternet->ihandle[hInternet->nb].post = NULL;
    274277
    275278  curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_COOKIEFILE, "ALL");
     
    321324#ifdef MSG_LAF_VERBOSE
    322325    fprintf(stderr,"FROM ULINET !!");
    323     fprintf(stderr,"HEADER : %s\n",lpszHeaders);
     326    fprintf(stderr,"HEADER : [%s] %d\n",lpszHeaders,dwHeadersLength);
    324327#endif
    325328    curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_POST,1);
     
    328331    curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_VERBOSE,1);
    329332#endif
    330     curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_POSTFIELDS,lpszHeaders);
    331     curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_POSTFIELDSIZE,dwHeadersLength+1);
     333    hInternet->ihandle[hInternet->nb].post=strdup(lpszHeaders);
     334    curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_POSTFIELDS,hInternet->ihandle[hInternet->nb].post);
     335    curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_POSTFIELDSIZE,(long)dwHeadersLength);
    332336  }
    333337  if(hInternet->ihandle[hInternet->nb].header!=NULL)
     
    338342  curl_multi_add_handle(hInternet->handle,hInternet->ihandle[hInternet->nb].handle);
    339343 
     344  hInternet->ihandle[hInternet->nb].header=NULL;
    340345  ++hInternet->nb;
    341   hInternet->ihandle[hInternet->nb].header=NULL;
    342346
    343347#ifdef ULINET_DEBUG
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