added 'Pragma: no-cache' header

This commit is contained in:
Michael Rash 2012-08-15 22:46:49 -04:00
parent 419fbafa04
commit a646a024d9

View File

@ -14,9 +14,16 @@ int main(void)
char *ip_str = NULL;
if ((ip_str = getenv("REMOTE_ADDR")) != NULL)
printf("Content-Type: text/html;\r\n\r\n%s\r\n", ip_str);
fprintf(stdout,
"Pragma: no-cache\r\n"
"Content-Type: text/plain\r\n\r\n%s\r\n",
ip_str
);
else
printf("Content-Type: text/html;\r\n\r\nNULL\r\n");
fprintf(stdout,
"Pragma: no-cache\r\n"
"Content-Type: text/plain\r\n\r\nNULL\r\n"
);
return 0;
}