commit 7a2e855d28d1984c1d60bd4606a4e345b975a69e
parent 0dda6f996fcadccb415ab5836495bfe41c776df5
Author: Joris Vink <joris@coders.se>
Date: Wed, 26 Jun 2013 16:57:34 +0200
set tstamp to 0 in the correct location
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/example/src/example.c b/modules/example/src/example.c
@@ -51,6 +51,7 @@ serve_style_css(struct http_request *req)
char *date;
time_t tstamp;
+ tstamp = 0;
if (http_request_header_get(req, "if-modified-since", &date)) {
tstamp = kore_date_to_time(date);
free(date);
@@ -58,7 +59,6 @@ serve_style_css(struct http_request *req)
kore_debug("header was present with %ld", tstamp);
}
- tstamp = 0;
if (tstamp != 0 && tstamp <= static_mtime_css_style) {
ret = http_response(req, 304, NULL, 0);
} else {