summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a0ce16d)
raw | patch | inline | side by side (parent: a0ce16d)
author | Florian Forster <ff@octo.it> | |
Tue, 6 Jul 2010 20:35:40 +0000 (22:35 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 6 Jul 2010 20:35:40 +0000 (22:35 +0200) |
src/action_show_graph_json.c | patch | blob | history |
index a182a626baf620e9ed456c95a10cd1b70bb05689..402627ce36eb7e9a810ebd1e5698bca6de057473 100644 (file)
int action_show_graph_json (void) /* {{{ */
{
show_graph_data_t data;
+
+ time_t now;
+ char time_buffer[128];
+ int status;
+
char title[1024];
graph_ident_t *ident;
char *ident_json;
return (ENOMEM);
}
- printf ("Content-Type: text/plain\n\n");
+ printf ("Content-Type: text/plain\n");
+
+ now = time (NULL);
+ status = time_to_rfc1123 (now + 300, time_buffer, sizeof (time_buffer));
+ if (status == 0)
+ printf ("Expires: %s\n"
+ "Cache-Control: public\n",
+ time_buffer);
+ printf ("\n");
memset (title, 0, sizeof (title));
graph_get_title (data.cfg, title, sizeof (title));