From 3c4d7fe5a3ba86018c88dd912f464702088487e8 Mon Sep 17 00:00:00 2001 From: totoro Date: Mon, 14 Aug 2017 22:25:43 +0200 Subject: [PATCH] add to_Content_Disposition function which get a string and transform it to the corresponding alternative. If the disposition string is not know the default type is inline --- web/CXM_multihost_http_server.anubis | 11 +++++++++++ 1 file changed, 11 insertions(+), 0 deletions(-) diff --git a/web/CXM_multihost_http_server.anubis b/web/CXM_multihost_http_server.anubis index aab3d80..0062d1e 100644 --- a/web/CXM_multihost_http_server.anubis +++ b/web/CXM_multihost_http_server.anubis @@ -203,6 +203,17 @@ public define String } . +public define Content_Disposition + to_Content_Disposition + ( + String disposition_string + )= + if disposition_string = "attachment" then attachment + else if disposition_string = "inline" then inline + else + inline +. + public type AWP_Handler_Answer: printable_tree(Printable_tree p_tree), send_file(String full_path, Content_Disposition c_disposition) -- libgit2 0.21.4