Ignore:
Timestamp:
Oct 28, 2012, 2:09:47 PM (12 years ago)
Author:
djay
Message:

Print specific headers when a [headers] section was added to the main.cfg file (can add headers such as X-Powered-By for instance). Handle reading file in cache as binary (solving file size not corresponding for text files).

File:
1 edited

Legend:

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

    r370 r375  
    18381838
    18391839#ifdef DEBUG
    1840   fprintf(stderr,"\n%i\n",i);
     1840  fprintf(stderr,"\n%d\n",__LINE__);
     1841  fflush(stderr);
    18411842  dumpMaps(request_input_real_format);
    18421843  dumpMaps(request_output_real_format);
    18431844  dumpMap(request_inputs);
    1844   fprintf(stderr,"\n%i\n",i);
     1845  fprintf(stderr,"\n%d\n",__LINE__);
     1846  fflush(stderr);
    18451847#endif
    18461848
     
    19111913         
    19121914          sprintf(storageNameOnServer,"%s/%s",path->value,fileNameOnServer);
     1915          printf("\n\nName on server %s\n",storageNameOnServer);
     1916#ifdef DEBUG
    19131917          fprintf(stderr,"Name on server %s\n",storageNameOnServer);
    19141918          fprintf(stderr,"fileNameOnServer: %s\n",fileNameOnServer);
     1919#endif
    19151920          mode=S_IRWXU|S_IRGRP|S_IROTH;
    19161921          targetFile = open (storageNameOnServer,O_RDWR|O_CREAT|O_TRUNC,S_IRWXU|S_IRGRP|S_IROTH);
    19171922          if(targetFile<0){
     1923#ifdef DEBUG
    19181924            fprintf(stderr,"could not create the new file,%s\n",fileNameOnServer);         
     1925#endif
    19191926          }else{
    19201927            while (cgiFormFileRead(file, buffer, BufferLen, &got) ==cgiFormSuccess){
     
    19261933          cgiFormFileClose(file);
    19271934          close(targetFile);
     1935#ifdef DEBUG
    19281936          fprintf(stderr,"File \"%s\" has been uploaded",fileNameOnServer);
     1937#endif
    19291938        }
    19301939      }
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