File tree 1 file changed +3
-34
lines changed
1 file changed +3
-34
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ Rebol [
36
36
]
37
37
]
38
38
39
+ import 'mime-types
40
+
39
41
append system/options/log [httpd: 1 ]
40
42
41
43
;------------------------------------------------------------------------
@@ -461,39 +463,6 @@ sys/make-scheme [
461
463
;511 "Network Authentication Required"
462
464
]
463
465
464
- MIME-Types: make map! [
465
- %.txt "text/plain"
466
- %.html "text/html"
467
- %.htm "text/html"
468
- %.js "text/javascript"
469
- %.css "text/css"
470
- %.csv "text/csv"
471
- %.ics "text/calendar"
472
- %.gif "image/gif"
473
- %.png "image/png"
474
- %.jpg "image/jpeg"
475
- %.jpeg "image/jpeg"
476
- %.ico "image/x-icon"
477
- %.svg "image/svg+xml"
478
- %.json "application/json"
479
- %.pdf "application/pdf"
480
- %.swf "application/x-shockwave-flash"
481
- %.wasm "application/wasm"
482
- %.xls "application/vnd.ms-excel"
483
- %.xlsx "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
484
- %.zip "application/zip"
485
- %.7z "application/x-7z-compressed"
486
- %.doc "application/msword"
487
- %.wav "audio/wav"
488
- %.mid "audio/midi"
489
- %.midi "audio/x-midi"
490
- %.otf "font/otf"
491
- %.ttf "font/ttf"
492
- %.woff "font/woff"
493
- %.woff2 "font/woff2"
494
- %.xhtml "application/xhtml+xml"
495
- ]
496
-
497
466
Respond : function [ port [port! ]] [
498
467
ctx: port/extra
499
468
out: ctx/out
@@ -504,7 +473,7 @@ sys/make-scheme [
504
473
505
474
unless out/header/Content-Type [
506
475
if out/target [
507
- out/header/Content-Type: pick MIME-Types suffix ? out/target
476
+ out/header/Content-Type: mime-type ? out/target
508
477
]
509
478
if all [
510
479
none? out/header/Content-Type ; no mime found above
You can’t perform that action at this time.
0 commit comments