Added support for .ico files:

-/mar/ico/hoon
 * Utilizes similar structure to /mar/png/hoon, w/ changed mimetype
-/lib/server
 * Added ico-response, again similar to png w/ same caching
-/app/file-server
 * Added reference to ico-response:gen

i showed you my ico, plz respond
This commit is contained in:
rabsef-bicrym 2021-04-29 04:38:43 +00:00
parent d1327db316
commit 04537e6fc1
3 changed files with 18 additions and 0 deletions

View File

@ -222,6 +222,7 @@
[~ %js] (js-response:gen file)
[~ %css] (css-response:gen file)
[~ %png] (png-response:gen file)
[~ %ico] (ico-response:gen file)
::
[~ %html]
%. file

View File

@ -110,6 +110,11 @@
|= =octs
^- simple-payload:http
[[200 [['content-type' 'image/png'] max-1-wk ~]] `octs]
::
++ ico-response
|= =octs
^- simple-payload:http
[[200 [['content-type' 'image/x-icon'] max-1-wk ~]] `octs]
::
++ woff2-response
|= =octs

12
pkg/arvo/mar/ico.hoon Normal file
View File

@ -0,0 +1,12 @@
|_ dat=@
++ grow
|%
++ mime [/image/x-icon (as-octs:mimes:html dat)]
--
++ grab
|%
++ mime |=([p=mite q=octs] q.q)
++ noun @
--
++ grad %mime
--