Changeset 682 for trunk/zoo-project/zoo-kernel/zoo_loader.c
- Timestamp:
- Jun 26, 2015, 2:07:46 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/zoo_loader.c
r680 r682 29 29 * Specific includes 30 30 */ 31 #ifndef WIN3232 31 #include "fcgio.h" 33 32 #include "fcgi_config.h" 34 33 #include "fcgi_stdio.h" 35 #endif36 34 #include <sys/types.h> 37 35 #include <unistd.h> 38 36 #include "service_internal.h" 39 37 #include "response_print.h" 40 41 42 #ifdef WIN3243 #include "windows.h"44 #define strtok_r strtok_s45 #endif46 38 47 39 extern "C" { … … 54 46 } 55 47 48 #ifdef WIN32 49 #include "windows.h" 50 #define strtok_r strtok_s 51 #endif 52 56 53 #include "service_internal.h" 57 54 #include "request_parser.h" 58 59 #ifdef WIN3260 #include "server_internal.h"61 #endif62 55 63 56 int runRequest(map**); … … 178 171 fprintf(stderr,"(( \n %s \n %s \n ))",*arrayStep,value); 179 172 #endif 180 #ifdef WIN32181 char* tmp = url_decode(value);182 if(tmpMap!=NULL)183 addToMap(tmpMap,*arrayStep,tmp);184 else185 tmpMap=createMap(*arrayStep,tmp);186 free(tmp);187 #else188 173 if(tmpMap!=NULL) 189 174 addToMap(tmpMap,*arrayStep,value); 190 175 else 191 176 tmpMap=createMap(*arrayStep,value); 192 #endif193 177 arrayStep++; 194 178 delete[]value; … … 206 190 char *buffer=(char*)malloc((flen+1)*sizeof(char)); 207 191 fread(buffer,flen,1,lf); 192 char *pchr=strrchr(buffer,'>'); 193 cgiContentLength=strlen(buffer)-strlen(pchr)+1; 194 buffer[cgiContentLength]=0; 208 195 fclose(lf); 209 196 addToMap(tmpMap,"request",buffer); 210 197 free(buffer); 211 cgiContentLength=flen+9;212 198 } 213 199 #endif … … 387 373 } 388 374 //addToMap(tmpMap,name,value); 389 /* knut: strtok(_r) ignores delimiter bytes at start and end of string; 390 * it will return non-empty string or NULL, e.g. "metapath=" yields value=NULL. 391 * This modification sets value="" instead of NULL. 392 */ 393 addToMap(tmpMap,name, value != NULL ? value : ""); 394 375 /* knut: strtok(_r) ignores delimiter bytes at start and end of string; 376 * it will return non-empty string or NULL, e.g. "metapath=" yields value=NULL. 377 * This modification sets value="" instead of NULL. 378 */ 379 addToMap(tmpMap,name, value != NULL ? value : ""); 395 380 free(name); 396 381 free(value); … … 412 397 free(strQuery); 413 398 414 415 399 runRequest(&tmpMap); 416 400
Note: See TracChangeset
for help on using the changeset viewer.