Changeset 621 for trunk/zoo-project/zoo-kernel/ulinet.c
- Timestamp:
- Apr 9, 2015, 5:23:06 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/ulinet.c
r607 r621 238 238 handle0->ihandle[i].header=NULL; 239 239 } 240 if(handle.post!=NULL) 241 free(handle.post); 240 242 free(handle.mimeType); 241 243 handle.mimeType = NULL; … … 272 274 hInternet->ihandle[hInternet->nb].nDataAlloc = 0; 273 275 hInternet->ihandle[hInternet->nb].pabyData = NULL; 276 hInternet->ihandle[hInternet->nb].post = NULL; 274 277 275 278 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_COOKIEFILE, "ALL"); … … 321 324 #ifdef MSG_LAF_VERBOSE 322 325 fprintf(stderr,"FROM ULINET !!"); 323 fprintf(stderr,"HEADER : %s\n",lpszHeaders);326 fprintf(stderr,"HEADER : [%s] %d\n",lpszHeaders,dwHeadersLength); 324 327 #endif 325 328 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_POST,1); … … 328 331 curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_VERBOSE,1); 329 332 #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); 332 336 } 333 337 if(hInternet->ihandle[hInternet->nb].header!=NULL) … … 338 342 curl_multi_add_handle(hInternet->handle,hInternet->ihandle[hInternet->nb].handle); 339 343 344 hInternet->ihandle[hInternet->nb].header=NULL; 340 345 ++hInternet->nb; 341 hInternet->ihandle[hInternet->nb].header=NULL;342 346 343 347 #ifdef ULINET_DEBUG
Note: See TracChangeset
for help on using the changeset viewer.