Changeset 279
- Timestamp:
- 06/02/10 08:09:32 (20 months ago)
- Files:
-
- 1 modified
-
trunk/src/ows/ows.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ows/ows.c
r278 r279 275 275 /* GET could only handle KVP */ 276 276 if (cgi_method_get()) o->request->method = OWS_METHOD_KVP; 277 277 278 /* POST could handle KVP or XML encoding */ 278 279 else if (cgi_method_post()) { … … 289 290 !strcmp(getenv("CONTENT_TYPE"), "text/plain")) 290 291 o->request->method = OWS_METHOD_XML; 292 291 293 /* Command line Unit Test cases with XML values (not HTTP) */ 292 294 } else if (!cgi_method_post() && !cgi_method_get() && query[0] == '<') … … 294 296 else if (!cgi_method_post() && !cgi_method_get()) 295 297 o->request->method = OWS_METHOD_KVP; 298 296 299 else ows_error(o, OWS_ERROR_REQUEST_HTTP, "Wrong HTTP request Method", "http"); 297 300 … … 334 337 if (!o->exit) query = cgi_getback_query(o); 335 338 336 /* Usage or Version command line options */337 339 if (query == NULL || strlen(query) == 0) { 340 341 /* Usage or Version command line options */ 338 342 if (argc > 1) { 339 343 … … 349 353 else ows_error(o, OWS_ERROR_INVALID_PARAMETER_VALUE, 350 354 "Service Unknown", "service"); 351 352 355 o->exit = true; 353 } 356 357 } else { 358 ows_error(o, OWS_ERROR_INVALID_PARAMETER_VALUE, 359 "Service Unknown", "service"); 360 o->exit = true; 361 } 354 362 } 355 363 356 357 364 /* Log input query if asked */ 358 if (o->log != NULL)359 fprintf(o->log, "[QUERY]\n%s\n ---\n", query);360 361 o->request = ows_request_init();365 if (o->log && query) 366 fprintf(o->log, "[QUERY]\n%s\n", query); 367 368 if (!o->exit) o->request = ows_request_init(); 362 369 if (!o->exit) ows_kvp_or_xml(o, query); 363 370 … … 405 412 406 413 #if TINYOWS_FCGI 407 } 414 if (o->log) fprintf(o->log, "---\n"); 415 o->exit = false; 416 } 417 if (o->log) fprintf(o->log, "== FCGI SHUTDOWN == \n"); 408 418 OS_LibShutdown(); 409 419 #endif