summaryrefslogtreecommitdiffstats
path: root/cpukit/mghttpd/mongoose.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/mghttpd/mongoose.h')
-rw-r--r--cpukit/mghttpd/mongoose.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/cpukit/mghttpd/mongoose.h b/cpukit/mghttpd/mongoose.h
index ad7c40f2dd..787922a983 100644
--- a/cpukit/mghttpd/mongoose.h
+++ b/cpukit/mghttpd/mongoose.h
@@ -124,6 +124,19 @@ struct mg_callbacks {
// Parameters:
// status: HTTP error status code.
int (*http_error)(struct mg_connection *, int status);
+
+ // Called when mongoose needs to generate an HTTP etag.
+ // Implementing this callback allows a custom etag to be generated. If
+ // not implemented the standard etag generator is used which is the
+ // modification time as a hex value and the file size.
+ // Use this callback if the modification time cannot be controlled.
+ // Parameters:
+ // path: path to the file being requested
+ // etag: buffer to write the etag into
+ // etag_len: the length of the etag buffer
+ // Return value:
+ int (*http_etag)(const struct mg_connection *,
+ const char *path, char *etag, size_t etag_len);
};
// Start web server.