source: trunk/zoo-project/zoo-kernel/ulinet.c @ 841

Last change on this file since 841 was 841, checked in by jmckenna, 5 years ago

handle variable declarations on Windows

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc
File size: 18.0 KB
Line 
1/*
2 *  ulinet.c
3 *
4 * Author : Gérald FENOY
5 *
6 * Copyright (c) 2008-2015 GeoLabs SARL
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 *
26 */
27
28#define _ULINET
29#define MAX_WAIT_MSECS 180*1000 /* Wait max. 180 seconds */
30#include "ulinet.h"
31#include <assert.h>
32#include <ctype.h>
33
34/**
35 * Write the downloaded content to a _HINTERNET structure
36 *
37 * @param buffer the buffer to read
38 * @param size size of each member
39 * @param nmemb number of element to read
40 * @param data the _HINTERNET structure to write in
41 * @return the size red, -1 if buffer is NULL
42 */
43size_t write_data_into(void *buffer, size_t size, size_t nmemb, void *data){
44  size_t realsize = size * nmemb;
45  _HINTERNET *psInternet;
46  if(buffer==NULL){
47    buffer=NULL;
48    return -1;
49  }
50  psInternet=(_HINTERNET *)data;
51  if(psInternet->pabyData){
52    psInternet->pabyData=(unsigned char*)realloc(psInternet->pabyData,psInternet->nDataLen+realsize+1);
53    psInternet->nDataAlloc+=psInternet->nDataLen+realsize+1;
54  }
55  else{
56    psInternet->pabyData=(unsigned char*)malloc(psInternet->nDataLen+realsize+1);
57    psInternet->nDataAlloc=realsize+1;
58  }
59
60  if (psInternet->pabyData) {
61    memcpy( psInternet->pabyData + psInternet->nDataLen, buffer, realsize);
62    psInternet->nDataLen += realsize;
63    psInternet->pabyData[psInternet->nDataLen] = 0;
64  }
65
66  buffer=NULL;
67  return realsize;
68}
69
70/**
71 * In case of presence of "Set-Cookie" in the headers red, store the cookie
72 * identifier in cookie
73 *
74 * @param buffer the buffer to read
75 * @param size size of each member
76 * @param nmemb number of element to read
77 * @param data the _HINTERNET structure to write in
78 * @return the size red, -1 if buffer is NULL
79 * @see cookie
80 */
81size_t header_write_data(void *buffer, size_t size, size_t nmemb, void *data){
82  if(strncmp("Set-Cookie: ",(char*)buffer,12)==0){
83    int i;
84    char* tmp;
85    int cnt;
86    _HINTERNET *psInternet;
87    for(i=0;i<12;i++)
88#ifndef WIN32
89      buffer++;
90#else
91        ;
92#endif
93    tmp=strtok(buffer,";");
94    cnt=0;
95    psInternet=(_HINTERNET *)data;
96    if(tmp!=NULL && psInternet!=NULL){
97      psInternet->cookie=(char*)malloc(sizeof(char)*(strlen(tmp)+1));
98      sprintf(psInternet->cookie,"%s",tmp);
99    }
100  }
101  return size * nmemb;//write_data_into(buffer,size,nmemb,data,HEADER);
102};
103
104/**
105 * Define the proxy to use for a CURL handler
106 *
107 * @param handle the CURL handler
108 * @param host the proxy host (including http://)
109 * @param port the proxy port
110 */
111void setProxy(CURL* handle,char* host,long port){
112  char* proxyDef=(char*)malloc((strlen(host)+10+2)*sizeof(char));
113  sprintf(proxyDef,"%s:%ld",host,port);
114  curl_easy_setopt(handle,CURLOPT_PROXY,proxyDef);
115  free(proxyDef);
116}
117
118/**
119 * MACOSX
120 */
121#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
122
123
124char* CFStringToCString(CFStringRef dest,char *buffer){
125  CFStringEncoding encoding = kCFStringEncodingUTF8;
126  Boolean bool2 = CFStringGetCString(dest,buffer,1024,encoding);
127  if(bool2){
128    printf("Loaded into local_buffer");
129    return buffer;
130  }
131  return NULL;
132}
133
134OSStatus setProxiesForProtcol(CURL* handle,const char *proto){
135  OSStatus              err;
136  CFDictionaryRef proxyDict;
137  CFArrayRef            proxies;
138 
139  CFStringRef key_enabled = NULL;
140  CFStringRef key_host = NULL;
141  CFStringRef key_port = NULL;
142 
143  bool proxy_enabled;
144  char *proxy_host;
145  long proxy_port;
146 
147  proxyDict = NULL;
148  proxies = NULL;
149
150  err = noErr;
151  proxyDict = SCDynamicStoreCopyProxies(NULL);
152
153  if(strncmp(proto,"http",4)==0){
154      key_enabled=kSCPropNetProxiesHTTPEnable;
155      key_host=kSCPropNetProxiesHTTPProxy;
156      key_port=kSCPropNetProxiesHTTPPort;
157  }
158  else
159    if(strncmp(proto,"https",5)==0){
160      key_enabled=kSCPropNetProxiesHTTPSEnable;
161      key_host=kSCPropNetProxiesHTTPSProxy;
162      key_port=kSCPropNetProxiesHTTPSPort;
163    }
164
165  CFNumberGetValue(CFDictionaryGetValue(proxyDict,key_enabled),kCFNumberIntType,&proxy_enabled);
166  if(proxy_enabled){
167    CFNumberGetValue(CFDictionaryGetValue(proxyDict,key_port),CFNumberGetType(CFDictionaryGetValue(proxyDict,key_port)),&proxy_port);
168    char buffer[1024];
169    CFStringToCString(CFDictionaryGetValue(proxyDict,key_host),buffer);
170    proxy_host=buffer;
171
172#ifdef MSG_LAF_VERBOSE
173    printf("\n**[PROXY SETTINGS DETECTION %s (%d) %s:%li (%s)]**\n",proto,proxy_enabled,(char*)proxy_host,proxy_port,buffer);
174#endif
175
176    if (proxyDict == NULL) {
177      err = coreFoundationUnknownErr;
178    }
179
180    setProxy(handle,proxy_host,proxy_port);
181  }
182  return err;
183}
184#else
185/**
186 * Should autodetect the proxy configuration (do nothing on linux)
187 *
188 * @param handle a CURL handle
189 * @param proto the protocol requiring the use of a proxy
190 */
191int setProxiesForProtcol(CURL* handle,const char *proto){
192#ifdef MSG_LAF_VERBOSE
193  fprintf( stderr, "setProxiesForProtocol (do nothing) ...\n" );
194#endif
195  return 0;
196}
197#endif
198
199/**
200 * Create a HINTERNET
201 *
202 * @param lpszAgent the HTPP User-Agent to use to send requests
203 * @param  dwAccessType type of access required
204 * @param  lpszProxyName the name of the proxy server(s) to use
205 * @param  lpszProxyBypass ip address or host names which should not be routed
206 *  through the proxy
207 * @param  dwFlags Options (INTERNET_FLAG_ASYNC,INTERNET_FLAG_FROM_CACHE,INTERNET_FLAG_OFFLINE)
208 * @return the created HINTERNET
209 */
210HINTERNET InternetOpen(char* lpszAgent,int dwAccessType,char* lpszProxyName,char* lpszProxyBypass,int dwFlags){
211  HINTERNET ret;
212  ret.handle=curl_multi_init();
213  ret.agent=strdup(lpszAgent);
214  ret.nb=0;
215  ret.ihandle[ret.nb].header=NULL;
216  return ret;
217}
218
219/**
220 * Add missing headers to an existing _HINTERNET
221 *
222 *
223 * @param handle the _HINTERNET pointer
224 * @param key the header parameter name
225 * @param value the header parameter value
226 * @return 0 if the operation succeeded, -1 in other case.
227 */
228int AddMissingHeaderEntry(_HINTERNET* handle,const char* key,const char* value){
229  int length=strlen(key)+strlen(value)+3;
230  char *entry=(char*)malloc((length)*sizeof(char));
231  if(entry==NULL)
232    return -1;
233  snprintf (entry, length, "%s: %s", key, value);
234  handle->header = curl_slist_append (handle->header, entry);
235  free(entry);
236  return 0;
237}
238
239/**
240 * Verify if a host is protected (appear in [security] > hosts)
241 *
242 * @param protectedHosts string containing all the protected hosts (coma separated)
243 * @param url string used to extract the host from
244 * @return 1 if the host is listed as protected, 0 in other case
245 */
246int isProtectedHost(const char* protectedHosts,const char* url){
247  char *token, *saveptr;
248  int cnt;
249  char* host; 
250  token = strtok_r (url, "//", &saveptr);
251  cnt=0;
252  while(token!=NULL && cnt<=1){
253    fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,token);
254    if(cnt==1)
255      fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,strstr(protectedHosts,token));
256    fflush(stderr);
257    if(cnt==1 && strstr(protectedHosts,token)!=NULL){
258      fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,strstr(protectedHosts,token));
259      return 1;
260    }
261    token = strtok_r (NULL, "/", &saveptr);
262    cnt+=1;
263  }
264  return 0;
265}
266
267/**
268 * Add headers defined in [security] > attributes to an existing HINTERNET
269 * @see isProtectedHost, AddMissingHeaderEntry
270 *
271 * @param handle the _HINTERNET pointer
272 * @param conf the header parameter name
273 * @param value the header parameter value
274 * @return 0 if the operation succeeded, -1 in other case.
275 */
276void AddHeaderEntries(HINTERNET* handle,maps* conf){
277  map* passThrough=getMapFromMaps(conf,"security","attributes");
278  map* targetHosts=getMapFromMaps(conf,"security","hosts");
279  char* passedHeader[10];
280  int cnt=0;
281  if(passThrough!=NULL && targetHosts!=NULL){
282    char *tmp=zStrdup(passThrough->value);
283    char *token, *saveptr;
284    int i;   
285    token = strtok_r (tmp, ",", &saveptr);
286    for(i=0;i<handle->nb;i++){
287      if(targetHosts->value[0]=='*' || isProtectedHost(targetHosts->value,handle->ihandle[i].url)==1){
288        while (token != NULL){
289          int j;
290      map* tmpMap;       
291          int length=strlen(token)+6;
292          char* tmp1=(char*)malloc(length*sizeof(char));
293          snprintf(tmp1,6,"HTTP_");
294          for(j=0;token[j]!='\0';j++){
295            if(token[j]!='-')
296              tmp1[5+j]=toupper(token[i]);
297            else
298              tmp1[5+j]='_';
299            tmp1[5+j+1]='\0';
300          }
301          fprintf(stderr,"%s %d %s \n",__FILE__,__LINE__,tmp1);
302          tmpMap = getMapFromMaps(conf,"renv",tmp1);
303          if(tmpMap!=NULL)         
304            AddMissingHeaderEntry(&handle->ihandle[i],token,tmpMap->value);
305          free(tmp1);
306          if(handle->ihandle[i].header!=NULL)
307            curl_easy_setopt(handle->ihandle[i].handle,CURLOPT_HTTPHEADER,handle->ihandle[i].header);
308          cnt+=1;
309          token = strtok_r (NULL, ",", &saveptr);
310        }
311      }
312    }
313    free(tmp);
314  }
315}
316
317/**
318 * Close a HINTERNET connection and free allocated resources
319 *
320 * @param handle0 the HINTERNET connection to close
321 */
322void InternetCloseHandle(HINTERNET* handle0){
323  int i=0;
324  for(i=0;i<handle0->nb;i++){
325    _HINTERNET handle=handle0->ihandle[i];
326    if(handle.hasCacheFile>0){
327      fclose(handle.file);
328      unlink(handle.filename);
329    }
330    else{
331      handle.pabyData = NULL;
332      handle.nDataAlloc = handle.nDataLen = 0;
333    }
334    if(handle0->ihandle[i].header!=NULL){
335      curl_slist_free_all(handle0->ihandle[i].header);
336      handle0->ihandle[i].header=NULL;
337    }
338    if(handle.post!=NULL)
339      free(handle.post);
340    if(handle.url!=NULL)
341      free(handle.url);
342    if(handle.mimeType!=NULL)
343      free(handle.mimeType);
344    if(handle.cookie!=NULL)
345      free(handle.cookie);
346  }
347  if(handle0->handle)
348    curl_multi_cleanup(handle0->handle);
349  free(handle0->agent);
350  for(i=handle0->nb-1;i>=0;i--){
351    free(handle0->waitingRequests[i]);
352  }
353}
354
355/**
356 * Create a new element in the download queue
357 *
358 * @param hInternet the HINTERNET connection to add the download link
359 * @param lpszUrl the url to download
360 * @param lpszHeaders the additional headers to be sent to the HTTP server
361 * @param dwHeadersLength the size of the additional headers
362 * @param dwFlags desired download mode (INTERNET_FLAG_NO_CACHE_WRITE for not using cache file)
363 * @param dwContext not used
364 */
365HINTERNET InternetOpenUrl(HINTERNET* hInternet,LPCTSTR lpszUrl,LPCTSTR lpszHeaders,size_t dwHeadersLength,size_t dwFlags,size_t dwContext){
366
367  char filename[255];
368  struct MemoryStruct header;
369
370  hInternet->ihandle[hInternet->nb].handle=curl_easy_init( );
371  hInternet->ihandle[hInternet->nb].hasCacheFile=0;
372  hInternet->ihandle[hInternet->nb].nDataAlloc = 0;
373  hInternet->ihandle[hInternet->nb].url = NULL;
374  hInternet->ihandle[hInternet->nb].mimeType = NULL;
375  hInternet->ihandle[hInternet->nb].cookie = NULL;
376  hInternet->ihandle[hInternet->nb].nDataLen = 0;
377  hInternet->ihandle[hInternet->nb].id = hInternet->nb;
378  hInternet->ihandle[hInternet->nb].nDataAlloc = 0;
379  hInternet->ihandle[hInternet->nb].pabyData = NULL;
380  hInternet->ihandle[hInternet->nb].post = NULL;
381 
382  curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_COOKIEFILE, "ALL");
383#ifndef TIGER
384  curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_COOKIELIST, "ALL");
385#endif
386  curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_USERAGENT, hInternet->agent);
387 
388  curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_FOLLOWLOCATION,1);
389  curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_MAXREDIRS,3);
390 
391  header.memory=NULL;
392  header.size = 0;
393
394  curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_HEADERFUNCTION, header_write_data);
395  curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_WRITEHEADER, (void *)&header);
396
397#ifdef MSG_LAF_VERBOSE
398  curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_VERBOSE, 1);
399#endif
400
401     
402  switch(dwFlags)
403    {
404    case INTERNET_FLAG_NO_CACHE_WRITE:
405      hInternet->ihandle[hInternet->nb].hasCacheFile=-1;
406      curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_WRITEFUNCTION, write_data_into);
407      curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_WRITEDATA, (void*)&hInternet->ihandle[hInternet->nb]);
408      break;
409    default:
410      sprintf(hInternet->ihandle[hInternet->nb].filename,"/tmp/ZOO_Cache%d",(int)time(NULL));
411      hInternet->ihandle[hInternet->nb].filename[24]=0;
412#ifdef MSG_LAF_VERBOSE
413      fprintf(stderr,"file=%s",hInternet->ihandle[hInternet->nb].filename);
414#endif
415      hInternet->ihandle[hInternet->nb].filename=filename;
416      hInternet->ihandle[hInternet->nb].file=fopen(hInternet->ihandle[hInternet->nb].filename,"w+");
417   
418      hInternet->ihandle[hInternet->nb].hasCacheFile=1;
419      curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_WRITEFUNCTION, NULL);
420      curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle, CURLOPT_WRITEDATA, hInternet->ihandle[hInternet->nb].file);
421      hInternet->ihandle[hInternet->nb].nDataLen=0;
422      break;
423    }
424#ifdef ULINET_DEBUG
425  fprintf(stderr,"URL (%s)\nBODY (%s)\n",lpszUrl,lpszHeaders);
426#endif
427  if(lpszHeaders!=NULL && strlen(lpszHeaders)>0){
428#ifdef MSG_LAF_VERBOSE
429    fprintf(stderr,"FROM ULINET !!");
430    fprintf(stderr,"HEADER : [%s] %d\n",lpszHeaders,dwHeadersLength);
431#endif
432    curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_POST,1);
433#ifdef ULINET_DEBUG
434    fprintf(stderr,"** (%s) %d **\n",lpszHeaders,dwHeadersLength);
435    curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_VERBOSE,1);
436#endif
437    hInternet->ihandle[hInternet->nb].post=strdup(lpszHeaders);
438    curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_POSTFIELDS,hInternet->ihandle[hInternet->nb].post);
439    curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_POSTFIELDSIZE,(long)dwHeadersLength);
440  }
441  if(hInternet->ihandle[hInternet->nb].header!=NULL)
442    curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_HTTPHEADER,hInternet->ihandle[hInternet->nb].header);
443
444  curl_easy_setopt(hInternet->ihandle[hInternet->nb].handle,CURLOPT_URL,lpszUrl);
445  hInternet->ihandle[hInternet->nb].url = zStrdup(lpszUrl);
446
447  curl_multi_add_handle(hInternet->handle,hInternet->ihandle[hInternet->nb].handle);
448 
449  hInternet->ihandle[hInternet->nb].header=NULL;
450  ++hInternet->nb;
451
452#ifdef ULINET_DEBUG
453  fprintf(stderr,"DEBUG MIMETYPE: %s\n",hInternet.mimeType);
454  fflush(stderr);
455#endif
456  return *hInternet;
457};
458
459/**
460 * Download all opened urls in the queue
461 *
462 * @param hInternet the HINTERNET structure containing the queue
463 * @return 0
464 */
465int processDownloads(HINTERNET* hInternet){
466  int still_running=0;
467  int msgs_left=0;
468  int i=0;
469  do{
470    curl_multi_perform(hInternet->handle, &still_running);
471  }while(still_running); 
472  for(i=0;i<hInternet->nb;i++){
473    char *tmp;
474    curl_easy_getinfo(hInternet->ihandle[i].handle,CURLINFO_CONTENT_TYPE,&tmp);
475    if(tmp!=NULL)
476      hInternet->ihandle[i].mimeType=strdup(tmp);
477    curl_easy_getinfo(hInternet->ihandle[i].handle,CURLINFO_RESPONSE_CODE,&hInternet->ihandle[i].code);
478    curl_multi_remove_handle(hInternet->handle, hInternet->ihandle[i].handle);
479    curl_easy_cleanup(hInternet->ihandle[i].handle);
480  }
481  return 0;
482}
483
484/**
485 * Initialize the cookie for a specific index (hInternet.nb)
486 *
487 * @param hInternet the HINTERNET structure to know the cookie index to reset
488 * @return 1
489 * @see HINTERNET
490 */
491int freeCookieList(HINTERNET hInternet){
492  if(hInternet.ihandle[hInternet.nb].cookie)
493    free(hInternet.ihandle[hInternet.nb].cookie);
494  hInternet.ihandle[hInternet.nb].cookie=NULL;
495#ifndef TIGER
496  curl_easy_setopt(hInternet.ihandle[hInternet.nb].handle, CURLOPT_COOKIELIST, "ALL");
497#endif
498  return 1;
499}
500
501/**
502 * Copy a downloaded content
503 *
504 * @param hInternet the _HINTERNET structure
505 * @param lpBuffer the memory space to copy the downloaded content
506 * @param dwNumberOfBytesToRead the size of lpBuffer
507 * @param lpdwNumberOfBytesRead number of bytes red
508 * @return 1 on success, 0 if failure
509 */
510int InternetReadFile(_HINTERNET hInternet,LPVOID lpBuffer,int dwNumberOfBytesToRead, size_t *lpdwNumberOfBytesRead){
511  int dwDataSize;
512
513  if(hInternet.hasCacheFile>0){
514    fseek (hInternet.file , 0 , SEEK_END);
515    dwDataSize=ftell(hInternet.file); //taille du ficher
516    rewind (hInternet.file);
517  }
518  else{
519    memset(lpBuffer,0,hInternet.nDataLen+1);
520    memcpy(lpBuffer, hInternet.pabyData, hInternet.nDataLen );
521    dwDataSize=hInternet.nDataLen;
522    free( hInternet.pabyData );
523    hInternet.pabyData=NULL;
524  }
525
526  if( dwNumberOfBytesToRead /* buffer size */ < dwDataSize )
527    return 0;
528
529#ifdef MSG_LAF_VERBOSE
530  printf("\nfile size : %dko\n",dwDataSize/1024);
531#endif
532
533  if(hInternet.hasCacheFile>0){
534    *lpdwNumberOfBytesRead = fread(lpBuffer,1,dwDataSize,hInternet.file); 
535  }
536  else{
537    *lpdwNumberOfBytesRead = hInternet.nDataLen;
538    free( hInternet.pabyData );
539    hInternet.pabyData = NULL;
540    hInternet.nDataAlloc = hInternet.nDataLen = 0;
541  }
542
543  if( *lpdwNumberOfBytesRead < dwDataSize )
544      return 0;
545  else
546      return 1; // TRUE
547}
548
549
550/**
551 * Use basic authentication for accessing a resource
552 *
553 * @param hInternet the _HINTERNET structure
554 * @param login the login to use to authenticate
555 * @param passwd the password to use to authenticate
556 */
557int setBasicAuth(HINTERNET hInternet,char* login,char* passwd){
558  char *tmp;
559  tmp=(char*)malloc((strlen(login)+strlen(passwd)+2)*sizeof(char));
560  sprintf(tmp,"%s:%s",login,passwd);
561  if(curl_easy_setopt(hInternet.ihandle[hInternet.nb].handle,CURLOPT_USERPWD,tmp)==CURLE_OUT_OF_MEMORY){
562    free(tmp);
563    return -1;
564  }
565  curl_easy_setopt(hInternet.ihandle[hInternet.nb].handle, CURLOPT_HTTPAUTH,CURLAUTH_ANY);
566  free(tmp);
567  return 0;
568}
Note: See TracBrowser for help on using the repository browser.

Search

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