Changeset 508 for trunk/gsdl/src/recpt
- Timestamp:
- 1999-09-02T12:24:36+12:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/cgiwrapper.cpp
r465 r508 12 12 /* 13 13 $Log$ 14 Revision 1.19 1999/09/02 00:24:36 rjmcnab 15 fixed bug in getting POST arguments 16 14 17 Revision 1.18 1999/08/20 01:02:07 sjboddie 15 18 added some usage logging … … 96 99 #include "recptconfig.h" 97 100 #include <stdlib.h> 101 102 103 // get GSDL_GSDLHOME 104 #include "gsdlhome.h" 98 105 99 106 … … 112 119 #include "fcgiapp.h" 113 120 #endif 114 115 116 // Note: site.h would not be needed if we could117 // dynamically find out gsdlhome.118 #include "site.h"119 121 120 122 … … 408 410 char *content_length_str = getenv("CONTENT_LENGTH"); 409 411 if (request_method_str != NULL && strcmp(request_method_str, "POST") == 0 && 410 content_length_str != NULL) {412 content_length_str != NULL) { 411 413 // POST form data 412 414 int content_length = text_t(content_length_str).getint(); 413 char c; 414 cin.get(c); 415 while (content_length > 0 && !cin.eof()) { 416 argstr.push_back (c); 417 content_length--; 418 cin.get(c); 415 if (content_length > 0) { 416 char c; 417 do { 418 cin.get(c); 419 if (cin.eof()) break; 420 argstr.push_back (c); 421 content_length--; 422 } while (content_length > 0); 419 423 } 420 424 421 425 } else { 422 426 aURIStr = getenv("QUERY_STRING"); 423 if (aURIStr != NULL) { 427 if ((request_method_str != NULL && strcmp(request_method_str, "GET") == 0) 428 || aURIStr != NULL) { 424 429 // GET form data 425 argstr = aURIStr;430 if (aURIStr != NULL) argstr = aURIStr; 426 431 } else { 427 432 // debugging from command line
Note:
See TracChangeset
for help on using the changeset viewer.