|
|
|
@ -97,12 +97,10 @@ main(){ |
|
|
|
|
} |
|
|
|
|
s_cgi *cgi; |
|
|
|
|
while(FCGI_Accept() >= 0) { |
|
|
|
|
// cgiReadVariables() returns NULL if QUESRY_STRING is empty,
|
|
|
|
|
// and it is empty when neither width not height are defined,
|
|
|
|
|
// so checking its return value is useless.
|
|
|
|
|
cgi = cgiInit(); |
|
|
|
|
if (cgi == NULL) { |
|
|
|
|
fprintf(stderr, "%s\n", "Error initializaing CGI"); |
|
|
|
|
http_code = HTTP_ERROR; |
|
|
|
|
goto fcgi_out; |
|
|
|
|
} |
|
|
|
|
char *ip = getenv("REMOTE_ADDR"); |
|
|
|
|
if (ip == NULL) { |
|
|
|
|
fprintf(stderr, "%s\n", "Env REMOTE_ADDR is not set"); |
|
|
|
|