From c0a2527a83dde2c23dad2bb0d28ef4cf64da6c6c Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Wed, 7 Dec 2022 14:19:15 -0500 Subject: http_static: derive mime type from file extensions Type: improvement Signed-off-by: Dave Barach Change-Id: I0f087477e257f5119d7d6182d19f8796773a1f19 --- src/plugins/http_static/http_static.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/plugins/http_static/http_static.h') diff --git a/src/plugins/http_static/http_static.h b/src/plugins/http_static/http_static.h index 5ea1a6eab8f..2850d356b74 100644 --- a/src/plugins/http_static/http_static.h +++ b/src/plugins/http_static/http_static.h @@ -50,6 +50,8 @@ typedef struct int free_data; /** File cache pool index */ u32 cache_pool_index; + /** Content type, e.g. text, text/javascript, etc. */ + http_content_type_t content_type; } hss_session_t; typedef struct hss_session_handle_ @@ -150,6 +152,9 @@ typedef struct u8 enable_url_handlers; /** Max cache size before LRU occurs */ u64 cache_size; + + /** hash table of file extensions to mime types string indices */ + uword *mime_type_indices_by_file_extensions; } hss_main_t; extern hss_main_t hss_main; -- cgit 1.2.3-korg