projects
/
fwknop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
419fbaf
)
added 'Pragma: no-cache' header
author
Michael Rash
<mbr@cipherdyne.org>
Thu, 16 Aug 2012 02:46:49 +0000 (22:46 -0400)
committer
Michael Rash
<mbr@cipherdyne.org>
Thu, 16 Aug 2012 02:46:49 +0000 (22:46 -0400)
extras/myip/myip.c
patch
|
blob
|
history
diff --git
a/extras/myip/myip.c
b/extras/myip/myip.c
index
8546ef2
..
84ba0d9
100644
(file)
--- a/
extras/myip/myip.c
+++ b/
extras/myip/myip.c
@@
-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;
}