Changeset 381 for trunk/zoo-project/zoo-kernel/zoo_loader.c
- Timestamp:
- Dec 28, 2012, 12:41:25 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/zoo_loader.c
r380 r381 83 83 #endif 84 84 85 char *strQuery=strdup(cgiQueryString); 85 86 char *strQuery=NULL; 87 if(cgiQueryString!=NULL) 88 strQuery=strdup(cgiQueryString); 86 89 map* tmpMap=NULL; 87 90 … … 93 96 char *res=NULL; 94 97 int r=0; 95 while( r=fread(buffer,sizeof(char),1,cgiIn)){98 while((r=fread(buffer,sizeof(char),1,cgiIn))){ 96 99 cgiContentLength+=r; 97 100 if(res==NULL){ … … 115 118 char *buffer=new char[cgiContentLength+1]; 116 119 int r=0; 117 if( (r=fread(buffer,sizeof(char),cgiContentLength,cgiIn))!=0){120 if(fread(buffer,sizeof(char),cgiContentLength,cgiIn)>=0){ 118 121 buffer[cgiContentLength]=0; 119 122 tmpMap=createMap("request",buffer); … … 196 199 xmlDocPtr doc = xmlParseMemory(t1->value,cgiContentLength); 197 200 198 199 201 { 200 202 xmlXPathObjectPtr reqptr=extractFromDoc(doc,"/*[local-name()='Envelope']/*[local-name()='Body']/*"); … … 244 246 xmlXPathFreeObject(reqptr); 245 247 } 246 //xmlFree(req);247 248 } 248 249 if(strncasecmp(t1->value,"GetCapabilities",15)==0){ … … 252 253 addToMap(tmpMap,"version",(char*)content); 253 254 xmlXPathFreeObject(versptr); 254 //xmlFree(vers);255 255 xmlFree(content); 256 256 }else{ … … 259 259 if(tval!=NULL) 260 260 addToMap(tmpMap,"version",tval); 261 xmlFree(tval);262 261 tval = (char*) xmlGetProp(cur,BAD_CAST "language"); 263 262 if(tval!=NULL) … … 287 286 } 288 287 } 289 //xmlFree(id); 290 } 291 xmlFree(tval); 288 } 292 289 xmlFreeDoc(doc); 293 290 xmlCleanupParser(); … … 329 326 } 330 327 328 if(strQuery!=NULL) 329 free(strQuery); 331 330 runRequest(tmpMap); 332 331
Note: See TracChangeset
for help on using the changeset viewer.