Changeset 6 for trunk/thirds/cgic206/cgic.c
- Timestamp:
- Aug 11, 2010, 2:51:39 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/thirds/cgic206/cgic.c
r1 r6 136 136 cgiGetenv(&cgiServerPort, "SERVER_PORT"); 137 137 cgiGetenv(&cgiRequestMethod, "REQUEST_METHOD"); 138 if(strcmp(cgiRequestMethod,"")==0 && argc>=1) 139 cgiRequestMethod="GET"; 138 140 cgiGetenv(&cgiPathInfo, "PATH_INFO"); 139 141 cgiGetenv(&cgiPathTranslated, "PATH_TRANSLATED"); 140 142 cgiGetenv(&cgiScriptName, "SCRIPT_NAME"); 141 143 cgiGetenv(&cgiQueryString, "QUERY_STRING"); 144 if(strcmp(cgiQueryString,"")==0 && argc>=2){ 145 cgiQueryString=argv[1]; 146 }else 147 fprintf(stderr,"cgiQueryString : %s\n",cgiQueryString); 142 148 cgiGetenv(&cgiRemoteHost, "REMOTE_HOST"); 143 149 cgiGetenv(&cgiRemoteAddr, "REMOTE_ADDR"); … … 190 196 cgiGetenv(&cgiContentLengthString, "CONTENT_LENGTH"); 191 197 cgiContentLength = atoi(cgiContentLengthString); 198 if(cgiContentLength==0 && argc>=2){ 199 cgiContentLength=strlen(argv[1]); 200 } 201 fprintf(stderr,"%d\n",cgiContentLength); 192 202 cgiGetenv(&cgiAccept, "HTTP_ACCEPT"); 193 203 cgiGetenv(&cgiUserAgent, "HTTP_USER_AGENT"); … … 208 218 #endif /* WIN32 */ 209 219 cgiFormEntryFirst = 0; 210 cgiIn = stdin;211 cgiOut = stdout;220 cgiIn = FCGI_stdin; 221 cgiOut = FCGI_stdout; 212 222 cgiRestored = 0; 213 223 … … 293 303 cgiFreeResources(); 294 304 } 305 FCGI_Finish(); 295 306 return result; 296 307 }
Note: See TracChangeset
for help on using the changeset viewer.