diff --git a/.dockerignore b/.dockerignore index c60a343..b052bff 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,6 @@ *.fasl Dockerfile +Dockerfile.new whatsxmpp *~ *.sqlite* diff --git a/Dockerfile b/Dockerfile index 49d8aa4..2ee7c8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,101 @@ -FROM rigetti/lisp AS whatscl-compiled +FROM clfoundation/sbcl:alpine3.13 AS builder -RUN apt update -y && apt install -y git -RUN sbcl --eval '(progn (quicklisp:update-dist "quicklisp" :prompt nil) (sb-ext:exit))' -RUN git clone https://github.com/sharplispers/ironclad /src/ironclad -RUN git clone https://github.com/eeeeeta/websocket-driver /src/websocket-driver -RUN git clone https://git.theta.eu.org/whatscl.git /src/whatscl -ADD ./ /src/whatsxmpp -WORKDIR /src/whatsxmpp -RUN make +RUN apk add --no-cache git -FROM debian:stable-slim AS whatsxmpp -WORKDIR /wx -RUN apt-get update && apt-get install -y libz-dev libsqlite3-dev libssl-dev ca-certificates && apt-get clean && rm -rf /var/lib/apt/lists/* -RUN mkdir /wx-data -COPY --from=whatscl-compiled /src/whatsxmpp/whatsxmpp /wx/whatsxmpp -ENTRYPOINT ["/wx/whatsxmpp"] +RUN git clone https://github.com/daewok/sbcl.git /usr/local/src/sbcl/ + +WORKDIR /usr/local/src/sbcl + +RUN set -x && git checkout static-executable-v2-2.1.3 + +# Install build prereq and build SBCL with sb-linkable-runtime and +# sb-prelink-linkage-table +RUN set -x \ + # I frequently build arm executables on an arm64 computer. Need to add this + # otherwise SBCL can get confused + && case "$(cat /etc/apk/arch)" in \ + armv7) SBCL_ARCH=arm;; \ + aarch64) SBCL_ARCH=arm64;; \ + x86_64) SBCL_ARCH=x86-64;; \ + *) echo "Unknown arch" >&2; exit 1;; \ + esac \ + && export SBCL_ARCH \ + && apk add --no-cache ca-certificates curl openssl make gcc musl-dev linux-headers gnupg patch zlib-dev zlib-static \ + # Remove the hardcoding of armv5 as target arch. Use the default provided + # by the base image. Required when building for ARM on Alpine 3.12. + && sed -i -e "s/CFLAGS += -marm -march=armv5/CFLAGS += -marm/" src/runtime/Config.arm-linux \ + && sh make.sh --fancy --with-sb-linkable-runtime --with-sb-prelink-linkage-table \ + && sh install.sh + +RUN mkdir -vp /srcs/common-lisp/ + +ENV HOME /srcs + +# Install Quicklisp + +ADD https://beta.quicklisp.org/quicklisp.lisp /tmp/quicklisp.lisp + +RUN set -x \ + && sbcl --non-interactive \ + --eval '(load "/tmp/quicklisp.lisp")' \ + --eval '(quicklisp-quickstart:install :path "/tmp/quicklisp")' \ + --eval '(ql::without-prompting (ql:add-to-init-file))' + +RUN apk add --no-cache sqlite-static openssl-libs-static + +# Clone sources + +RUN set -x && git clone https://github.com/eeeeeta/websocket-driver /srcs/common-lisp/websocket-driver +RUN set -x && git clone https://git.theta.eu.org/eta/whatscl.git /srcs/common-lisp/whatscl +COPY . /srcs/common-lisp/whatsxmpp + +# Load whatsxmpp into an image, save the foreign symbols it requires, and dump the +# core. + +RUN set -x \ + && sbcl --non-interactive \ + --eval '(sb-ext:restrict-compiler-policy (quote safety) 3 3)' \ + --eval '(ql:quickload :whatsxmpp)' \ + --load tools-for-build/dump-linkage-info.lisp \ + --eval '(sb-dump-linkage-info:dump-to-file "/tmp/linkage-info.sexp")' \ + --eval '(sb-ext:unlock-package (quote sb-sys))' \ + --eval '(defun sb-sys::reopen-shared-objects (&rest args) (declare (ignore args)))' \ + --eval '(sb-ext:save-lisp-and-die "/tmp/whatsxmpp.core")' + +# Build a static runtime, with libsqlite3 linked and the required symbols in the +# linkage table. + +RUN ls /usr/lib/ + +RUN set -x \ + && cat /tmp/linkage-info.sexp \ + && sbcl --script tools-for-build/create-linkage-table-prelink-info-override.lisp \ + /tmp/linkage-info.sexp \ + /tmp/linkage-table-prelink-info-override.c \ + && cat /tmp/linkage-table-prelink-info-override.c \ + && while read l; do \ + eval "${l%%=*}=\"${l#*=}\""; \ + done < /usr/local/lib/sbcl/sbcl.mk \ + && $CC $CFLAGS -Wno-builtin-declaration-mismatch -o /tmp/linkage-table-prelink-info-override.o -c /tmp/linkage-table-prelink-info-override.c \ + && $CC -no-pie -static $LINKFLAGS -o /tmp/static-sbcl /usr/local/lib/sbcl/$LIBSBCL /tmp/linkage-table-prelink-info-override.o -lsqlite3 -lssl -lcrypto $LIBS + +# Use the new static runtime to load the previous core and then dump a +# compressed executable with the toplevel function set to run the sb-gmp test +# suite. +RUN set -x \ + && /tmp/static-sbcl \ + --core /tmp/whatsxmpp.core \ + --disable-ldb \ + --lose-on-corruption \ + --non-interactive \ + --eval '(push :cl+ssl-foreign-libs-already-loaded *features*)' \ + --eval '(cl+ssl:reload)' \ + --eval '(sb-ext:save-lisp-and-die "/tmp/whatsxmpp" :executable t :toplevel (function whatsxmpp::main) :compression t)' + +FROM alpine + +RUN apk add --no-cache ca-certificates + +COPY --from=builder /tmp/whatsxmpp /whatsxmpp + +ENTRYPOINT /whatsxmpp diff --git a/default.nix b/default.nix deleted file mode 100644 index 98e9cb7..0000000 --- a/default.nix +++ /dev/null @@ -1,996 +0,0 @@ -{ depot ? import {}, pkgs ? import {} }: - -with depot.nix; -with depot.third_party.lisp; -let - lispPkgs = rec { - event-emitter = let - src = pkgs.fetchFromGitHub { - owner = "fukamachi"; - repo = "event-emitter"; - rev = "cb0e15f9de4c617cef3f5d5a22a41e28f9613d0b"; - sha256 = "1i18xzfr6334db9dzj0lsl7wxw1r1l0ixvn883mjbyqw0czp21h6"; - }; - in buildLisp.library { - name = "event-emitter"; - deps = [ (buildLisp.bundled "asdf") ]; - srcs = map (f: src + ("/" + f)) [ - "src/event-emitter.lisp" - ]; - }; - metabang-bind = let - src = pkgs.fetchFromGitHub { - owner = "gwkkwg"; - repo = "metabang-bind"; - rev = "9ab6e64a30261df109549d21ee7940df87db66bb"; - sha256 = "0681lp2j084w3dx02ah1vm5pk83cp5k090anwdlrjaxd1j4kbpbr"; - }; - in buildLisp.library { - name = "metabang-bind"; - deps = []; - srcs = map (f: src + ("/dev/" + f)) [ - "packages.lisp" - "macros.lisp" - "bind.lisp" - "binding-forms.lisp" - ]; - }; - qbase64 = let - src = pkgs.fetchFromGitHub { - owner = "chaitanyagupta"; - repo = "qbase64"; - rev = "6374899aec189600e6b7b77c89009d0835154b93"; - sha256 = "1dir0s70ca3hagxv9x15zq4p4ajgl7jrcgqsza2n2y7iqbxh0dwi"; - }; - in buildLisp.library { - name = "qbase64"; - deps = [ trivial-gray-streams metabang-bind ]; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "utils.lisp" - "stream-utils.lisp" - "qbase64.lisp" - ]; - }; - com-google-base = let - src = pkgs.fetchFromGitHub { - owner = "brown"; - repo = "base"; - rev = "498fd7224748a1cceaa6127edcedab6e3563aa84"; - sha256 = "0af9gz2rnw4wbdgx3v6bpyfjn04700irdvcp0s41jdp8djpip8f7"; - }; - in buildLisp.library { - name = "com.google.base"; - deps = []; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "optimize.lisp" - "syntax.lisp" - "error.lisp" - "type.lisp" - "octet.lisp" - "sequence.lisp" - ]; - }; - protobuf-src = pkgs.fetchFromGitHub { - owner = "brown"; - repo = "protobuf"; - rev = "f55c6f51848ff1f9d523fb293fbe99c076a34a95"; - sha256 = "1frm5s7wsi4nh1adc7qkph5r1cf24fgvbg0xvsyv7cmgg5r3bibi"; - }; - varint = buildLisp.library { - name = "varint"; - deps = [ com-google-base nibbles ]; - srcs = map (f: protobuf-src + ("/varint/" + f)) [ - "package.lisp" - "varint.lisp" - ]; - }; - protobuf = buildLisp.library { - name = "protobuf"; - deps = [ com-google-base varint ]; - srcs = map (f: protobuf-src + ("/" + f)) [ - "package.lisp" - "protocol-buffer.lisp" - "wire-format.lisp" - ]; - }; - trivial-utf-8 = let - src = builtins.fetchTarball { - url = "https://gitlab.common-lisp.net/trivial-utf-8/trivial-utf-8/-/archive/4d427cfbb1c452436a0efb71c3205c9da67f718f/trivial-utf-8-4d427cfbb1c452436a0efb71c3205c9da67f718f.tar.gz"; - sha256 = "1jz27gz8gvqdmvp3k9bxschs6d5b3qgk94qp2bj6nv1d0jc3m1l1"; - }; - in buildLisp.library { - name = "trivial-utf-8"; - deps = [ (buildLisp.bundled "asdf") ]; - srcs = map (f: src + ("/" + f)) [ - "trivial-utf-8.lisp" - ]; - }; - salza2 = let - src = builtins.fetchTarball { - url = "https://www.xach.com/lisp/salza2.tgz"; - sha256 = "0p38rj4gq7j5k807php7hrz7l2zyyfshv8i9yms7i8lkgg3433ki"; - }; - in buildLisp.library { - name = "salza2"; - deps = []; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "reset.lisp" - "specials.lisp" - "types.lisp" - "checksum.lisp" - "adler32.lisp" - "crc32.lisp" - "chains.lisp" - "bitstream.lisp" - "matches.lisp" - "compress.lisp" - "huffman.lisp" - "closures.lisp" - "compressor.lisp" - "utilities.lisp" - "zlib.lisp" - "gzip.lisp" - "user.lisp" - ]; - }; - zpng = let - src = builtins.fetchTarball { - url = "https://www.xach.com/lisp/zpng.tgz"; - sha256 = "0b3ag3jhl3z7kdls3ahdsdxsfhhw5qrizk769984f4wkxhb69rcm"; - }; - in buildLisp.library { - name = "zpng"; - deps = [ salza2 ]; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "specials.lisp" - "utils.lisp" - "chunk.lisp" - "conditions.lisp" - "png.lisp" - ]; - }; - zpb-exif = let - src = builtins.fetchTarball { - url = "https://www.xach.com/lisp/zpb-exif.tgz"; - sha256 = "15s227jhby55cisz14xafb0p1ws2jmrg2rrbbd00lrb97im84hy6"; - }; - in buildLisp.library { - name = "zpb-exif"; - deps = [ salza2 ]; - srcs = map (f: src + ("/" + f)) [ - "exif.lisp" - ]; - }; - skippy = let - src = builtins.fetchTarball { - url = "https://www.xach.com/lisp/skippy.tgz"; - sha256 = "1n8925qz19w00qc67z3hc97fpmfhi0r54dd50fzqm24vhyb7qwc2"; - }; - in buildLisp.library { - name = "skippy"; - deps = [ salza2 ]; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "conditions.lisp" - "types.lisp" - "bitstream.lisp" - "lzw.lisp" - "color-table.lisp" - "canvas.lisp" - "data-stream.lisp" - "image.lisp" - "gif89a.lisp" - "load-gif.lisp" - ]; - }; - puri = let - src = builtins.fetchTarball { - url = "http://files.kpe.io/puri/puri-1.5.7.tar.gz"; - sha256 = "0bdjcjr2wmwxhv4sr20hh6dhakjdal5hiwzpmvbwzgl394byk100"; - }; - in buildLisp.library { - name = "puri"; - deps = []; - srcs = map (f: src + ("/" + f)) [ - "src.lisp" - ]; - }; - cl-utilities = let - src = builtins.fetchTarball { - url = "https://common-lisp.net/project/cl-utilities/cl-utilities-latest.tar.gz"; - sha256 = "1dmbkdr8xm2jw5yx1makqbf1ypqbm0hpkd7zyknxv3cblvz0a87w"; - }; - in buildLisp.library { - name = "cl-utilities"; - deps = []; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "with-unique-names.lisp" - "once-only.lisp" - "compose.lisp" - "split-sequence.lisp" - "extremum.lisp" - "read-delimited.lisp" - "expt-mod.lisp" - "collecting.lisp" - "rotate-byte.lisp" - "copy-array.lisp" - ]; - }; - trivial-timers = let - src = builtins.fetchTarball { - url = "http://releases.unknownlamer.org/trivial-timers/trivial-timers_latest.tar.gz"; - sha256 = "0nxr0wb9n2jh6k3cj9ddx2hvgvr4bqb8k587cmj6pjsaa62344mb"; - }; - in buildLisp.library { - name = "trivial-timers"; - deps = []; - srcs = map (f: src + ("/" + f)) [ - "packages.lisp" - "timers-sbcl.lisp" - ]; - }; - quri = let - src = pkgs.fetchFromGitHub { - owner = "fukamachi"; - repo = "quri"; - rev = "b39ec54a07062334cfa37b31d14e39115921ffe0"; - sha256 = "1nw0m5fm84x9x8mx5pp6l2bhmpzmmgy4rwj3bkkg4qsp7h6a1ak7"; - }; - etld-nix = import ./nix/etld.nix { tld-names = src + "/data/effective_tld_names.dat"; }; - in buildLisp.library { - name = "quri"; - deps = [ (buildLisp.bundled "sb-cltl2") (buildLisp.bundled "asdf") babel alexandria split-sequence cl-utilities ]; - srcs = map (f: src + ("/src/" + f)) [ - "../quri.asd" - "port.lisp" - "util.lisp" - ] ++ [ - etld-nix - ] ++ map (f: src + ("/src/" + f)) [ - "error.lisp" - "encode.lisp" - "decode.lisp" - "parser.lisp" - "uri.lisp" - "uri/ftp.lisp" - "uri/http.lisp" - "uri/ldap.lisp" - "uri/file.lisp" - "domain.lisp" - "quri.lisp" - ]; - }; - trivial-mimes = let - mime-types = ./nix/mime.types; - mime-types-lisp = import ./nix/trivial-mimes.nix { mime-types = mime-types; }; - in buildLisp.library { - name = "trivial-mimes"; - deps = [ (buildLisp.bundled "uiop") ]; - native = []; - srcs = [ mime-types-lisp ]; - }; - cl-sqlite = let - src = pkgs.fetchFromGitHub { - owner = "TeMPOraL"; - repo = "cl-sqlite"; - rev = "be2fcc193f98e3d5bdc85958a806d612cc48740c"; - sha256 = "08iv7b4m0hh7qx2cvq4f510nrgdld0vicnvmqsh9w0fgrcgmyg4k"; - }; - in buildLisp.library { - name = "cl-sqlite"; - deps = [ iterate cffi ]; - native = [ pkgs.sqlite ]; - srcs = map (f: src + ("/" + f)) [ - "sqlite-ffi.lisp" - "cache.lisp" - "sqlite.lisp" - ]; - }; - fast-websocket = let - src = pkgs.fetchFromGitHub { - owner = "fukamachi"; - repo = "fast-websocket"; - rev = "7087d9cf4c3f7da4c68a275ad79eda853ac6f1b9"; - sha256 = "0hmp9mzz7svl0csh9n2954ddpcbngl87jfv32il2q8kkawiycij7"; - }; - in buildLisp.library { - name = "fast-websocket"; - deps = [ fast-io trivial-utf-8 alexandria ]; - srcs = map (f: src + ("/src/" + f)) [ - "ws.lisp" - "payload.lisp" - "constants.lisp" - "error.lisp" - "compose.lisp" - "parser.lisp" - "fast-websocket.lisp" - ]; - }; - fast-io = let - src = pkgs.fetchFromGitHub { - owner = "rpav"; - repo = "fast-io"; - rev = "603f4903dd74fb221859da7058ae6ca3853fe64b"; - sha256 = "00agvc0xx4w715i6ach05p995zpcpghn04xc06zyci06q677vw3n"; - }; - in buildLisp.library { - name = "fast-io"; - deps = [ alexandria trivial-gray-streams ]; - srcs = map (f: src + ("/src/" + f)) [ - "package.lisp" - "types.lisp" - "io.lisp" - "gray.lisp" - ]; - }; - proc-parse = let - src = pkgs.fetchFromGitHub { - owner = "fukamachi"; - repo = "proc-parse"; - rev = "3afe2b76f42f481f44a0a495256f7abeb69cef27"; - sha256 = "07vbj26bfq4ywlcmamsqyac29rsdsa8lamjqx1ycla1bcvgmi4w2"; - }; - in buildLisp.library { - name = "proc-parse"; - deps = [ alexandria babel (buildLisp.bundled "sb-cltl2") ]; - srcs = map (f: src + ("/src/" + f)) [ - "proc-parse.lisp" - ]; - }; - xsubseq = let - src = pkgs.fetchFromGitHub { - owner = "fukamachi"; - repo = "xsubseq"; - rev = "5ce430b3da5cda3a73b9cf5cee4df2843034422b"; - sha256 = "1xz79q0p2mclf3sqjiwf6izdpb6xrsr350bv4mlmdlm6rg5r99px"; - }; - in buildLisp.library { - name = "xsubseq"; - deps = [ (buildLisp.bundled "sb-cltl2") ]; - srcs = map (f: src + ("/src/" + f)) [ - "xsubseq.lisp" - ]; - }; - uuid = let - src = pkgs.fetchFromGitHub { - owner = "dardoria"; - repo = "uuid"; - rev = "f0052f34a006ec995086aa3b2e42182a178fe228"; - sha256 = "1ncwhyw0zggwpkzjsw7d4pkrlldi34xvb69c0bzxmyz2krg8rpx0"; - }; - in buildLisp.library { - name = "uuid"; - deps = [ ironclad trivial-utf-8 ]; - srcs = map (f: src + ("/" + f)) [ - "uuid.lisp" - ]; - }; - smart-buffer = let - src = pkgs.fetchFromGitHub { - owner = "fukamachi"; - repo = "smart-buffer"; - rev = "09b9a9a0b3abaa37abe9a730f5aac2643dca4e62"; - sha256 = "0qz1zzxx0wm5ff7gpgsq550a59p0qj594zfmm2rglj97dahj54l7"; - }; - in buildLisp.library { - name = "smart-buffer"; - deps = [ xsubseq flexi-streams (buildLisp.bundled "uiop") ]; - srcs = map (f: src + ("/src/" + f)) [ - "smart-buffer.lisp" - ]; - }; - fast-http = let - src = pkgs.fetchFromGitHub { - owner = "fukamachi"; - repo = "fast-http"; - rev = "502a37715dcb8544cc8528b78143a942de662c5a"; - sha256 = "0al2g7g219jjljsf7b23pbilpgacxy5as5gs2nqf76b5qni396mi"; - }; - in buildLisp.library { - name = "fast-http"; - deps = [ alexandria cl-utilities proc-parse babel xsubseq smart-buffer ]; - srcs = map (f: src + ("/src/" + f)) [ - "http.lisp" - "byte-vector.lisp" - "error.lisp" - "util.lisp" - "parser.lisp" - "multipart-parser.lisp" - "fast-http.lisp" - ]; - }; - wsd-src = pkgs.fetchFromGitHub { - owner = "eeeeeta"; - repo = "websocket-driver"; - rev = "03fdb0684c50fe77cf186d208c671bd9a1575985"; - sha256 = "06plrbk7sbz456hkxsd97ib7xvjp484d18l0r11pqjd1659smjb3"; - }; - wsd-base = buildLisp.library { - name = "websocket-driver-base"; - deps = [ fast-websocket fast-io event-emitter ironclad cl-base64 split-sequence bordeaux-threads ]; - srcs = map (f: wsd-src + ("/src/" + f)) [ - "util.lisp" - "ws/base.lisp" - "driver.lisp" - ]; - }; - wsd-client = buildLisp.library { - name = "websocket-driver-client"; - deps = [ wsd-base usocket cl-plus-ssl fast-io fast-websocket cl-base64 trivial-utf-8 ironclad quri fast-http ]; - srcs = map (f: wsd-src + ("/src/" + f)) [ - "ws/client.lisp" - "client.lisp" - ]; - }; - closure-common = let - src = pkgs.fetchFromGitHub { - owner = "sharplispers"; - repo = "closure-common"; - rev = "e3c5f5f454b72b01b89115e581c3c52a7e201e5c"; - sha256 = "0k5r2qxn122pxi301ijir3nayi9sg4d7yiy276l36qmzwhp4mg5n"; - }; - enable-character-runes = pkgs.writeText "character-runes.lisp" "(push :rune-is-character *features*)"; - in buildLisp.library { - name = "closure-common"; - deps = [ trivial-gray-streams babel ]; - srcs = [ - enable-character-runes - ] ++ map (f: src + ("/" + f)) [ - "package.lisp" - "definline.lisp" - "characters.lisp" - "syntax.lisp" - "encodings.lisp" - "encodings-data.lisp" - "xstream.lisp" - "ystream.lisp" - "hax.lisp" - ]; - }; - cxml = let - src = pkgs.fetchFromGitHub { - owner = "sharplispers"; - repo = "cxml"; - rev = "8701da08ba4aac30891b8d2005edb018c1d3d796"; - sha256 = "18fls3bx7vmnxfa6qara8fxp316d8kb3izar0kysvqg6l0a45a51"; - }; - in buildLisp.library { - name = "cxml"; - deps = [ (buildLisp.bundled "asdf") closure-common puri trivial-gray-streams ]; - srcs = [ - (src + "/cxml.asd") - ] ++ map (f: src + ("/xml/" + f)) [ - "package.lisp" - "util.lisp" - "sax-handler.lisp" - "xml-name-rune-p.lisp" - "split-sequence.lisp" - "xml-parse.lisp" - "unparse.lisp" - "xmls-compat.lisp" - "recoder.lisp" - "xmlns-normalizer.lisp" - "space-normalizer.lisp" - # "catalog.lisp" - "sax-proxy.lisp" - "atdoc-configuration.lisp" - ] ++ map (f: src + ("/dom/" + f)) [ - "package.lisp" - "dom-impl.lisp" - "dom-builder.lisp" - "dom-sax.lisp" - ] ++ map (f: src + ("/klacks/" + f)) [ - "package.lisp" - "klacks.lisp" - "klacks-impl.lisp" - "tap-source.lisp" - ]; - }; - cl-qrencode = let - src = pkgs.fetchFromGitHub { - owner = "jnjcc"; - repo = "cl-qrencode"; - rev = "0de2d8a3877b499a9a0bbb0a9e1247056ae4311e"; - sha256 = "1l5k131dchbf6cj8a8xqa731790p01p3qa1kdy2wa9dawy3ymkxr"; - }; - in buildLisp.library { - name = "cl-qrencode"; - deps = [ zpng ]; - srcs = map (f: src + ("/" + f)) [ - "packages.lisp" - "utils/util.lisp" - "rs-ecc/galois.lisp" - "rs-ecc/bch-ecc.lisp" - "rs-ecc/rs-ecc.lisp" - "qrencode/modes.lisp" - "qrencode/qrspec.lisp" - "qrencode/input.lisp" - "qrencode/bstream.lisp" - "qrencode/codeword.lisp" - "qrencode/matrix.lisp" - "qrencode/mask.lisp" - "qrencode/encode.lisp" - "image/png.lisp" - ]; - }; - vom = let - src = pkgs.fetchFromGitHub { - owner = "orthecreedence"; - repo = "vom"; - rev = "1aeafeb5b74c53741b79497e0ef4acf85c92ff24"; - sha256 = "0536kppj76ax4lrxhv42npkfjsmx45km2g439vf9jmw3apinz9cy"; - }; - in buildLisp.library { - name = "vom"; - deps = []; - srcs = map (f: src + ("/" + f)) [ - "vom.lisp" - ]; - }; - blackbird = let - src = pkgs.fetchFromGitHub { - owner = "orthecreedence"; - repo = "blackbird"; - rev = "d361f81c1411dec07f6c2dcb11c78f7aea9aaca8"; - sha256 = "0xfds5yaya64arzr7w1x38karyz11swzbhxx1afldpradj9dh19c"; - }; - in buildLisp.library { - name = "blackbird"; - deps = [ vom ]; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "syntax.lisp" - "promise.lisp" - "util.lisp" - ]; - }; - com-gigamonkeys-binary-data = let - src = pkgs.fetchFromGitHub { - owner = "gigamonkey"; - repo = "monkeylib-binary-data"; - rev = "22e908976d7f3e2318b7168909f911b4a00963ee"; - sha256 = "072v417vmcnvmyh8ddq9vmwwrizm7zwz9dpzi14qy9nsw8q649zw"; - }; - in buildLisp.library { - name = "com.gigamonkeys.binary-data"; - deps = [ alexandria ]; - srcs = map (f: src + ("/" + f)) [ - "packages.lisp" - "binary-data.lisp" - "common-datatypes.lisp" - ]; - }; - ieee-floats = let - src = pkgs.fetchFromGitHub { - owner = "marijnh"; - repo = "ieee-floats"; - rev = "566b51a005e81ff618554b9b2f0b795d3b29398d"; - sha256 = "1xyj49j9x3lc84cv3dhbf9ja34ywjk1c46dklx425fxw9mkwm83m"; - }; - in buildLisp.library { - name = "ieee-floats"; - deps = []; - srcs = map (f: src + ("/" + f)) [ - "ieee-floats.lisp" - ]; - }; - cl-jpeg = let - src = pkgs.fetchFromGitHub { - owner = "sharplispers"; - repo = "cl-jpeg"; - rev = "ec557038128df6895fbfb743bfe8faf8ec2534af"; - sha256 = "1bkkiqz8fqldlj1wbmrccjsvxcwj98h6s4b6gslr3cg2wmdv5xmy"; - }; - in buildLisp.library { - name = "cl-jpeg"; - deps = []; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "jpeg.lisp" - "io.lisp" - ]; - }; - deflate = let - src = pkgs.fetchFromGitHub { - owner = "pmai"; - repo = "deflate"; - rev = "fb940e63b89a6c4d168153dbf046552e106eb8a5"; - sha256 = "1jpdjnxh6cw2d8hk70r2sxn92is52s9b855irvwkdd777fdciids"; - }; - in buildLisp.library { - name = "deflate"; - deps = []; - srcs = map (f: src + ("/" + f)) [ - "deflate.lisp" - ]; - }; - trivial-features = let - src = pkgs.fetchFromGitHub { - owner = "trivial-features"; - repo = "trivial-features"; - rev = "e7bb968d1e0b00aaf06e0671a866a81dbfe99bee"; - sha256 = "1iczrsl561fz9f71dzals16749fccznm4jn8nmxnqas1qk7b331k"; - }; - in buildLisp.library { - name = "trivial-features"; - deps = []; - srcs = map (f: src + ("/src/" + f)) [ - "tf-sbcl.lisp" - ]; - }; - opticl-core = let - src = pkgs.fetchFromGitHub { - owner = "slyrus"; - repo = "opticl-core"; - rev = "b7cd13d26df6b824b216fbc360dc27bfadf04999"; - sha256 = "0458bllabcdjghfrqx6aki49c9qmvfmkk8jl75cfpi7q0i12kh95"; - }; - in buildLisp.library { - name = "opticl-core"; - deps = [ alexandria ]; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "opticl-core.lisp" - ]; - }; - retrospectiff = let - src = pkgs.fetchFromGitHub { - owner = "slyrus"; - repo = "retrospectiff"; - rev = "c2a69d77d5010f8cdd9045b3e36a08a73da5d321"; - sha256 = "0qsn9hpd8j2kp43dk05j8dczz9zppdff5rrclbp45n3ksk9inw8i"; - }; - in buildLisp.library { - name = "retrospectiff"; - deps = [ com-gigamonkeys-binary-data flexi-streams ieee-floats cl-jpeg deflate opticl-core ]; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "constants.lisp" - "globals.lisp" - "util.lisp" - "bit-array.lisp" - "lzw.lisp" - "jpeg.lisp" - "deflate.lisp" - "packbits.lisp" - "compression.lisp" - "binary-types.lisp" - "ifd.lisp" - "tiff-image.lisp" - "retrospectiff.lisp" - "retrospectiff2.lisp" - ]; - }; - cl-tga = let - src = pkgs.fetchFromGitHub { - owner = "fisxoj"; - repo = "cl-tga"; - rev = "4dc2f7b8a259b9360862306640a07a23d4afaacc"; - sha256 = "03k3npmn0xd3fd2m7vwxph82av2xrfb150imqrinlzqmzvz1v1br"; - }; - in buildLisp.library { - name = "cl-tga"; - deps = []; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "cl-tga.lisp" - ]; - }; - mmap = let - src = pkgs.fetchFromGitHub { - owner = "Shinmera"; - repo = "mmap"; - rev = "ba2e98c67e25f0fb8ff838238561120a23903ce7"; - sha256 = "0qd0xp20i1pcfn12kkapv9pirb6hd4ns7kz4zf1mmjwykpsln96q"; - }; - in buildLisp.library { - name = "mmap"; - deps = [ cffi ]; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "generic.lisp" - "posix.lisp" - ]; - }; - static-vectors = let - src = pkgs.fetchFromGitHub { - owner = "sionescu"; - repo = "static-vectors"; - rev = "67f2ed0da2244f3c2a69d3440eddcc14a3ad33f0"; - sha256 = "0prdwkyggr9wqwr7blhrb3hprsvbcgwn7144f7v4iy7i8621d8pq"; - }; - in buildLisp.library { - name = "static-vectors"; - deps = [ alexandria cffi ]; - srcs = map (f: src + ("/src/" + f)) [ - "pkgdcl.lisp" - "constantp.lisp" - "impl-sbcl.lisp" - "constructor.lisp" - "cffi-type-translator.lisp" - ]; - }; - swap-bytes = let - src = pkgs.fetchFromGitHub { - owner = "sionescu"; - repo = "swap-bytes"; - rev = "253ab928b91b8a1c3cea0434e87b8da5ce3c6014"; - sha256 = "1rs1166rabdlws4pyvsrwl32x476dh2yw15p56097mp8ixmcb0ap"; - }; - in buildLisp.library { - name = "swap-bytes"; - deps = [ trivial-features ]; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "sbcl-defknowns.lisp" - "sbcl-vops.lisp" - "sbcl.lisp" - "network.lisp" - "endianness.lisp" - ]; - }; - threebz = let - src = pkgs.fetchFromGitHub { - owner = "3b"; - repo = "3bz"; - rev = "d6119083b5e0b0a6dd3abc2877936c51f3f3deed"; - sha256 = "0fyxzyf2b6sc0w8d9g4nlva861565z6f3xszj0lw29x526dd9rhj"; - }; - in buildLisp.library { - name = "3bz"; - deps = [ alexandria cffi mmap trivial-features nibbles babel ]; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "tuning.lisp" - "util.lisp" - "constants.lisp" - "types.lisp" - "huffman-tree.lisp" - "ht-constants.lisp" - "io-common.lisp" - "io-mmap.lisp" - "io.lisp" - "deflate.lisp" - "checksums.lisp" - "zlib.lisp" - "gzip.lisp" - "api.lisp" - ]; - }; - pngload = let - src = pkgs.fetchFromGitHub { - owner = "bufferswap"; - repo = "pngload"; - rev = "b2e56733dd5d86a56b20c665676b86e566b4e223"; - sha256 = "15dkm3ba7byxk8qs6d3xnd58ybvjl6cjz75392z5fq5cqygbgfq5"; - }; - in buildLisp.library { - name = "pngload"; - deps = [ threebz alexandria cffi mmap parse-float static-vectors swap-bytes (buildLisp.bundled "uiop") zpb-exif ]; - srcs = map (f: src + ("/src/" + f)) [ - "package.lisp" - "common.lisp" # aha! - "source.lisp" - "source-ffi.lisp" - "properties.lisp" - "chunk.lisp" - "chunk-types.lisp" - "conditions.lisp" - "datastream.lisp" - "deinterlace.lisp" - "decode.lisp" - "metadata.lisp" - "png.lisp" - "png-mmap.lisp" - ]; - }; - opticl = let - src = pkgs.fetchFromGitHub { - owner = "slyrus"; - repo = "opticl"; - rev = "438881ae779fa4b113308a3c5c96783fd9618e02"; - sha256 = "13sv7n1ry8yp3fawvpf3y3kf7abbqxqmk8zpx349k3wh063i7l1l"; - }; - in buildLisp.library { - name = "opticl"; - deps = [ alexandria retrospectiff zpng pngload cl-jpeg skippy opticl-core cl-tga ]; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "coerce.lisp" - # "colors.lisp" - "imageops.lisp" - "invert.lisp" - "transform.lisp" - "convolve.lisp" - "morphology.lisp" - "gamma.lisp" - "shapes.lisp" - "tiff.lisp" - "jpeg.lisp" - "png.lisp" - "pngload.lisp" - "pnm.lisp" - "gif.lisp" - "tga.lisp" - "io.lisp" - "cluster.lisp" - "thresholding.lisp" - ]; - }; - nibbles = let - src = pkgs.fetchFromGitHub { - owner = "sharplispers"; - repo = "nibbles"; - rev = "2b99f103f84f0a6dcbc8212f7763d6b08b13e3fa"; - sha256 = "06ckb4hjl4kca9dwldqrz6gxmfic47makahq3p3ysv71zncr9zgm"; - }; - in buildLisp.library { - name = "nibbles"; - deps = [ trivial-gray-streams metabang-bind ]; - srcs = map (f: src + ("/" + f)) [ - "package.lisp" - "types.lisp" - "macro-utils.lisp" - "vectors.lisp" - "streams.lisp" - "sbcl-opt/fndb.lisp" - "sbcl-opt/nib-tran.lisp" - "sbcl-opt/x86-vm.lisp" - "sbcl-opt/x86-64-vm.lisp" - ]; - }; - ironclad = let - src = pkgs.fetchFromGitHub { - owner = "sharplispers"; - repo = "ironclad"; - rev = "c3aa33080621abc10fdb0f34acc4655cc4e982a6"; - sha256 = "0k4bib9mbrzalbl9ivkw4a7g4c7bbad1l5jw4pzkifqszy2swkr5"; - }; - in buildLisp.library { - name = "ironclad"; - deps = [ (buildLisp.bundled "sb-posix") (buildLisp.bundled "sb-rotate-byte") bordeaux-threads ]; - srcs = map (f: src + ("/src/" + f)) [ - "package.lisp" - "macro-utils.lisp" - "generic.lisp" - "conditions.lisp" - "util.lisp" - ] ++ map (f: src + ("/src/prng/" + f)) [ - "prng.lisp" - "generator.lisp" - "os-prng.lisp" - "fortuna.lisp" - ] ++ map (f: src + ("/src/opt/" + f)) [ - "sbcl/fndb.lisp" - "sbcl/x86oid-vm.lisp" - "sbcl/cpu-features.lisp" - ] ++ map (f: src + ("/src/" + f)) [ - "common.lisp" # aha! - ] ++ map (f: src + ("/src/ciphers/" + f)) [ - "cipher.lisp" - "padding.lisp" - "modes.lisp" - "salsa20.lisp" - "aes.lisp" - "arcfour.lisp" - "aria.lisp" - "blowfish.lisp" - "camellia.lisp" - "cast5.lisp" - "chacha.lisp" - "des.lisp" - "idea.lisp" - "keystream.lisp" - "kalyna.lisp" - "kuznyechik.lisp" - "make-cipher.lisp" - "misty1.lisp" - "rc2.lisp" - "rc5.lisp" - "rc6.lisp" - "seed.lisp" - "serpent.lisp" - "sm4.lisp" - "sosemanuk.lisp" - "square.lisp" - "tea.lisp" - "threefish.lisp" - "twofish.lisp" - "xchacha.lisp" - "xor.lisp" - "xsalsa20.lisp" - "xtea.lisp" - ] ++ map (f: src + ("/src/digests/" + f)) [ - "digest.lisp" - "adler32.lisp" - "blake2.lisp" - "blake2s.lisp" - "crc24.lisp" - "crc32.lisp" - "groestl.lisp" - "jh.lisp" - "kupyna.lisp" - "md2.lisp" - "md4.lisp" - "md5.lisp" - "md5-lispworks-int32.lisp" - "ripemd-128.lisp" - "ripemd-160.lisp" - "sha1.lisp" - "sha256.lisp" - "sha3.lisp" - "sha512.lisp" - "skein.lisp" - "sm3.lisp" - "streebog.lisp" - "tiger.lisp" - "tree-hash.lisp" - "whirlpool.lisp" - ] ++ map (f: src + ("/src/public-key/" + f)) [ - "public-key.lisp" - "curve25519.lisp" - "curve448.lisp" - "dsa.lisp" - "ed25519.lisp" - "ed448.lisp" - "elgamal.lisp" - "pkcs1.lisp" - "rsa.lisp" - ] ++ map (f: src + ("/src/macs/" + f)) [ - "mac.lisp" - "blake2-mac.lisp" - "blake2s-mac.lisp" - "cmac.lisp" - "hmac.lisp" - "gmac.lisp" - "poly1305.lisp" - "siphash.lisp" - "skein-mac.lisp" - ] ++ map (f: src + ("/src/kdf/" + f)) [ - "kdf-common.lisp" - "hmac.lisp" - "pkcs5.lisp" - "argon2.lisp" - "password-hash.lisp" - "scrypt.lisp" - ] ++ map (f: src + ("/src/aead/" + f)) [ - "aead.lisp" - "eax.lisp" - "etm.lisp" - "gcm.lisp" - ] ++ map (f: src + ("/src/" + f)) [ - "math.lisp" - "octet-stream.lisp" - ]; - }; - }; - whatscl = import ../whatscl { lispPkgs = lispPkgs; }; -in -with lispPkgs; -buildLisp.program { - name = "whatsxmpp"; - deps = [ whatscl blackbird cxml uuid cl-sqlite trivial-mimes drakma cl-qrencode trivial-backtrace opticl ]; - srcs = map (f: ./. + ("/" + f)) [ - "packages.lisp" - "utils.lisp" - "namespaces.lisp" - "component.lisp" - "xmpp.lisp" - "xep-0030.lisp" - "xep-0363.lisp" - "xep-0115.lisp" - "xep-0313.lisp" - "sqlite.lisp" - "db.lisp" - "media.lisp" - "message.lisp" - "stuff.lisp" - ]; - extraInit = "(sb-ext:restrict-compiler-policy 'safety 3 3)"; - main = "whatsxmpp::main"; -} diff --git a/nix/docker.nix b/nix/docker.nix deleted file mode 100644 index 51a9139..0000000 --- a/nix/docker.nix +++ /dev/null @@ -1,11 +0,0 @@ -let - pkgs = import {}; - whatsxmpp = import ../. {}; -in -pkgs.dockerTools.buildLayeredImage { - name = "eu.gcr.io/etainfra/whatsxmpp"; - tag = "latest"; - contents = [ whatsxmpp ]; - config.Entrypoint = [ "${whatsxmpp}/bin/whatsxmpp" ]; - config.Env = [ "SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" ]; -} diff --git a/nix/etld.nix b/nix/etld.nix deleted file mode 100644 index e53b93f..0000000 --- a/nix/etld.nix +++ /dev/null @@ -1,93 +0,0 @@ -{ tld-names, pkgs ? import {} }: - -pkgs.writeText "etld.lisp" '' -(in-package :cl-user) -(defpackage quri.etld - (:use :cl) - (:import-from :alexandria - :starts-with-subseq - :ends-with-subseq) - (:export :parse-domain)) -(in-package :quri.etld) - -(eval-when (:compile-toplevel :load-toplevel :execute) - (defvar *default-etld-names* "${tld-names}") - - (defun load-etld-data (&optional (etld-names-file *default-etld-names*)) - (with-open-file (in etld-names-file - :element-type #+lispworks :default #-lispworks 'character - :external-format #+clisp charset:utf-8 #-clisp :utf-8) - (loop with special-tlds = nil - with normal-tlds = (make-hash-table :test 'equal) - with wildcard-tlds = (make-hash-table :test 'equal) - for line = (read-line in nil nil) - while line - unless (or (= 0 (length line)) - (starts-with-subseq "//" line)) - do (cond - ((starts-with-subseq "*" line) - (setf (gethash (subseq line 2) wildcard-tlds) t)) - ((starts-with-subseq "!" line) - (push (subseq line 1) special-tlds)) - (t - (setf (gethash line normal-tlds) t))) - finally (return (list normal-tlds wildcard-tlds special-tlds)))))) - -(defvar *etlds* - #-abcl '#.(load-etld-data) - #+abcl (load-etld-data)) - -(defun next-subdomain (hostname &optional (start 0)) - (let ((pos (position #\. hostname :start start))) - (when pos - (incf pos) - (values (subseq hostname pos) - pos)))) - -(defun make-subdomain-iter (hostname) - (let ((current-pos 0) - (first t)) - (lambda () - (block nil - (when first - (setq first nil) - (return hostname)) - (multiple-value-bind (subdomain pos) - (next-subdomain hostname current-pos) - (when subdomain - (setf current-pos pos) - subdomain)))))) - -(defun parse-domain (hostname) - (dolist (tld (third *etlds*)) - (when (ends-with-subseq tld hostname) - (if (= (length tld) (length hostname)) - (return-from parse-domain hostname) - (when (char= (aref hostname (- (length hostname) (length tld) 1)) - #\.) - (return-from parse-domain - (subseq hostname - (- (length hostname) (length tld)))))))) - - (loop with iter = (make-subdomain-iter hostname) - with pre-prev-subdomain = nil - with prev-subdomain = nil - for subdomain = (funcall iter) - while subdomain - if (gethash subdomain (second *etlds*)) do - (return pre-prev-subdomain) - else if (gethash subdomain (first *etlds*)) do - (return (if (string= subdomain hostname) - nil - prev-subdomain)) - do (setf pre-prev-subdomain prev-subdomain - prev-subdomain subdomain) - finally - (let* ((pos (position #\. hostname :from-end t)) - (pos (and pos - (position #\. hostname :from-end t :end pos)))) - (return - (if pos - (subseq hostname (1+ pos)) - hostname))))) -'' diff --git a/nix/mime.types b/nix/mime.types deleted file mode 100644 index 8af0a16..0000000 --- a/nix/mime.types +++ /dev/null @@ -1,1918 +0,0 @@ -application/1d-interleaved-parityfec -application/3gpp-ims+xml -application/CSTAdata+xml -application/EDI-Consent -application/EDI-X12 -application/EDIFACT -application/H224 -application/activemessage -application/andrew-inset ez -application/annodex anx -application/applefile -application/applixware aw -application/atom+xml atom -application/atomcat+xml atomcat -application/atomdeleted+xml -application/atomicmail -application/atomserv+xml atomsrv -application/atomsvc+xml atomsvc -application/auth-policy+xml -application/batch-SMTP -application/batch-smtp -application/bbolin lin -application/beep+xml -application/calendar+xml -application/cals-1840 -application/ccmp+xml -application/ccxml+xml ccxml -application/cdmi-capability cdmia -application/cdmi-container cdmic -application/cdmi-domain cdmid -application/cdmi-object cdmio -application/cdmi-queue cdmiq -application/cea-2018+xml -application/cellml+xml -application/cfw -application/cnrp+xml -application/commonground -application/conference-info+xml -application/cpl+xml -application/csta+xml -application/cstadata+xml -application/cu-seeme cu -application/cybercash -application/davmount+xml davmount -application/dca-rft -application/dec-dx -application/dialog-info+xml -application/dicom dcm -application/dns -application/docbook+xml dbk -application/dskpp+xml -application/dsptype tsp -application/dssc+der dssc -application/dssc+xml xdssc -application/dvcs -application/ecmascript ecma es -application/edi-consent -application/edi-x12 -application/edifact -application/emma+xml emma -application/epp+xml -application/epub+zip epub -application/eshop -application/example -application/exi exi -application/fastinfoset -application/fastsoap -application/fdt+xml -application/fits -application/font-tdpfr pfr -application/framework-attributes+xml -application/futuresplash spl -application/ghostview -application/gml+xml gml -application/gpx+xml gpx -application/gxf gxf -application/gzip -application/h224 -application/held+xml -application/hta hta -application/http -application/hyperstudio stk -application/ibe-key-request+xml -application/ibe-pkg-reply+xml -application/ibe-pp-data -application/iges -application/im-iscomposing+xml -application/index -application/index.cmd -application/index.obj -application/index.response -application/index.vnd -application/inkml+xml ink inkml -application/iotp -application/ipfix ipfix -application/ipp -application/isup -application/java-archive jar -application/java-serialized-object ser -application/java-vm class -application/javascript js -application/json json -application/jsonml+json jsonml -application/kpml-request+xml -application/kpml-response+xml -application/link-format -application/lost+xml lostxml -application/lostsync+xml -application/m3g m3g -application/mac-binhex40 hqx -application/mac-compactpro cpt -application/macwriteii -application/mads+xml mads -application/marc mrc -application/marcxml+xml mrcx -application/mathematica ma mb nb nbp -application/mathml+xml mathml -application/mathml-content+xml -application/mathml-presentation+xml -application/mbms-associated-procedure-description+xml -application/mbms-deregister+xml -application/mbms-envelope+xml -application/mbms-msk+xml -application/mbms-msk-response+xml -application/mbms-protection-description+xml -application/mbms-reception-report+xml -application/mbms-register+xml -application/mbms-register-response+xml -application/mbms-user-service-description+xml -application/mbox mbox -application/media-policy-dataset+xml -application/media_control+xml -application/mediaservercontrol+xml mscml -application/metalink+xml metalink -application/metalink4+xml meta4 -application/mets+xml mets -application/mikey -application/mods+xml mods -application/moss-keys -application/moss-signature -application/mosskey-data -application/mosskey-request -application/mp21 m21 mp21 -application/mp4 mp4s -application/mpeg4-generic -application/mpeg4-iod -application/mpeg4-iod-xmt -application/ms-tnef -application/msaccess mdb -application/msc-ivr+xml -application/msc-mixer+xml -application/msword doc dot -application/mxf mxf -application/nasdata -application/news-checkgroups -application/news-groupinfo -application/news-message-id -application/news-transmission -application/nlsml+xml -application/nss -application/ocsp-request -application/ocsp-response -application/octet-stream bin bpk deploy dist distz dmg dms dump elc iso lha lrf lzh mar pkg so -application/oda oda -application/oebps-package+xml opf -application/ogg ogg ogx -application/omdoc+xml omdoc -application/onenote one onepkg onetmp onetoc onetoc2 -application/oxps oxps -application/parityfec -application/patch-ops-error+xml xer -application/pdf pdf -application/pgp-encrypted asc pgp -application/pgp-keys key -application/pgp-signature asc pgp sig -application/pics-rules prf -application/pidf+xml -application/pidf-diff+xml -application/pkcs10 p10 -application/pkcs7-mime p7c p7m -application/pkcs7-signature p7s -application/pkcs8 p8 -application/pkix-attr-cert ac -application/pkix-cert cer -application/pkix-crl crl -application/pkix-pkipath pkipath -application/pkixcmp pki -application/pls+xml pls -application/poc-settings+xml -application/postscript ai eps eps2 eps3 epsf epsi ps -application/prs.alvestrand.titrax-sheet -application/prs.cww cww -application/prs.nprend -application/prs.plucker -application/prs.rdf-xml-crypt -application/prs.xsf+xml -application/pskc+xml pskcxml -application/qsig -application/raptorfec -application/rar rar -application/rdf+xml rdf -application/reginfo+xml rif -application/relax-ng-compact-syntax rnc -application/remote-printing -application/resource-lists+xml rl -application/resource-lists-diff+xml rld -application/riscos -application/rlmi+xml -application/rls-services+xml rs -application/rpki-ghostbusters gbr -application/rpki-manifest mft -application/rpki-roa roa -application/rpki-updown -application/rsd+xml rsd -application/rss+xml rss -application/rtf rtf -application/rtx -application/samlassertion+xml -application/samlmetadata+xml -application/sbml+xml sbml -application/scvp-cv-request scq -application/scvp-cv-response scs -application/scvp-vp-request spq -application/scvp-vp-response spp -application/sdp sdp -application/sep+xml -application/set-payment -application/set-payment-initiation setpay -application/set-registration -application/set-registration-initiation setreg -application/sgml -application/sgml-open-catalog -application/shf+xml shf -application/sieve -application/simple-filter+xml -application/simple-message-summary -application/simpleSymbolContainer -application/simplesymbolcontainer -application/sla stl -application/slate -application/smil smi smil -application/smil+xml smi smil -application/smpte336m -application/soap+fastinfoset -application/soap+xml -application/sparql-query rq -application/sparql-results+xml srx -application/spirits-event+xml -application/srgs gram -application/srgs+xml grxml -application/sru+xml sru -application/ssdl+xml ssdl -application/ssml+xml ssml -application/tamp-apex-update -application/tamp-apex-update-confirm -application/tamp-community-update -application/tamp-community-update-confirm -application/tamp-error -application/tamp-sequence-adjust -application/tamp-sequence-adjust-confirm -application/tamp-status-query -application/tamp-status-response -application/tamp-update -application/tamp-update-confirm -application/tei+xml tei teicorpus -application/thraud+xml tfi -application/timestamp-query -application/timestamp-reply -application/timestamped-data tsd -application/tve-trigger -application/ulpfec -application/vcard+xml -application/vemmi -application/vividence.scriptfile -application/vnd.3M.Post-it-Notes -application/vnd.3gpp.bsf+xml -application/vnd.3gpp.pic-bw-large plb -application/vnd.3gpp.pic-bw-small psb -application/vnd.3gpp.pic-bw-var pvb -application/vnd.3gpp.sms -application/vnd.3gpp2.bcmcsinfo+xml -application/vnd.3gpp2.sms -application/vnd.3gpp2.tcap tcap -application/vnd.3m.post-it-notes pwn -application/vnd.FloGraphIt -application/vnd.HandHeld-Entertainment+xml -application/vnd.Kinar -application/vnd.MFER -application/vnd.Mobius.DAF -application/vnd.Mobius.DIS -application/vnd.Mobius.MBK -application/vnd.Mobius.MQY -application/vnd.Mobius.MSL -application/vnd.Mobius.PLC -application/vnd.Mobius.TXF -application/vnd.Quark.QuarkXPress -application/vnd.RenLearn.rlprint -application/vnd.SimTech-MindMapper -application/vnd.accpac.simply.aso aso -application/vnd.accpac.simply.imp imp -application/vnd.acucobol acu -application/vnd.acucorp acutc atc -application/vnd.adobe.air-application-installer-package+zip air -application/vnd.adobe.formscentral.fcdt fcdt -application/vnd.adobe.fxp fxp fxpl -application/vnd.adobe.partial-upload -application/vnd.adobe.xdp+xml xdp -application/vnd.adobe.xfdf xfdf -application/vnd.aether.imp -application/vnd.ah-barcode -application/vnd.ahead.space ahead -application/vnd.airzip.filesecure.azf azf -application/vnd.airzip.filesecure.azs azs -application/vnd.amazon.ebook azw -application/vnd.americandynamics.acc acc -application/vnd.amiga.ami ami -application/vnd.amundsen.maze+xml -application/vnd.android.package-archive apk -application/vnd.anser-web-certificate-issue-initiation cii -application/vnd.anser-web-funds-transfer-initiation fti -application/vnd.antix.game-component atx -application/vnd.apple.installer+xml mpkg -application/vnd.apple.mpegurl m3u8 -application/vnd.arastra.swi swi -application/vnd.aristanetworks.swi swi -application/vnd.astraea-software.iota iota -application/vnd.audiograph aep -application/vnd.autopackage -application/vnd.avistar+xml -application/vnd.balsamiq.bmml+xml -application/vnd.blueice.multipass mpm -application/vnd.bluetooth.ep.oob -application/vnd.bmi bmi -application/vnd.businessobjects rep -application/vnd.cab-jscript -application/vnd.canon-cpdl -application/vnd.canon-lips -application/vnd.cendio.thinlinc.clientconf -application/vnd.century-systems.tcp_stream -application/vnd.chemdraw+xml cdxml -application/vnd.chipnuts.karaoke-mmd mmd -application/vnd.cinderella cdy -application/vnd.cirpack.isdn-ext -application/vnd.claymore cla -application/vnd.cloanto.rp9 rp9 -application/vnd.clonk.c4group c4d c4f c4g c4p c4u -application/vnd.cluetrust.cartomobile-config c11amc -application/vnd.cluetrust.cartomobile-config-pkg c11amz -application/vnd.collection+json -application/vnd.collection.next+json -application/vnd.commerce-battelle -application/vnd.commonspace csp -application/vnd.comsocaller -application/vnd.contact.cmsg cdbcmsg -application/vnd.cosmocaller cmc -application/vnd.crick.clicker clkx -application/vnd.crick.clicker.keyboard clkk -application/vnd.crick.clicker.palette clkp -application/vnd.crick.clicker.template clkt -application/vnd.crick.clicker.wordbank clkw -application/vnd.criticaltools.wbs+xml wbs -application/vnd.ctc-posml pml -application/vnd.ctct.ws+xml -application/vnd.cups-pdf -application/vnd.cups-postscript -application/vnd.cups-ppd ppd -application/vnd.cups-raster -application/vnd.cups-raw -application/vnd.curl -application/vnd.curl.car car -application/vnd.curl.pcurl pcurl -application/vnd.cyan.dean.root+xml -application/vnd.cybank -application/vnd.dart dart -application/vnd.data-vision.rdz rdz -application/vnd.dece.data uvd uvf uvvd uvvf -application/vnd.dece.ttml+xml uvt uvvt -application/vnd.dece.unspecified uvvx uvx -application/vnd.dece.zip uvvz uvz -application/vnd.denovo.fcselayout-link fe_launch -application/vnd.dir-bi.plate-dl-nosuffix -application/vnd.dm.delegation+xml -application/vnd.dna dna -application/vnd.dolby.mlp mlp -application/vnd.dolby.mobile.1 -application/vnd.dolby.mobile.2 -application/vnd.dpgraph dpg -application/vnd.dreamfactory dfac -application/vnd.ds-keypoint kpxx -application/vnd.dtg.local -application/vnd.dtg.local.flash -application/vnd.dtg.local.html -application/vnd.dvb.ait ait -application/vnd.dvb.dvbj -application/vnd.dvb.esgcontainer -application/vnd.dvb.ipdcdftnotifaccess -application/vnd.dvb.ipdcesgaccess -application/vnd.dvb.ipdcesgaccess2 -application/vnd.dvb.ipdcesgpdd -application/vnd.dvb.ipdcroaming -application/vnd.dvb.iptv.alfec-base -application/vnd.dvb.iptv.alfec-enhancement -application/vnd.dvb.notif-aggregate-root+xml -application/vnd.dvb.notif-container+xml -application/vnd.dvb.notif-generic+xml -application/vnd.dvb.notif-ia-msglist+xml -application/vnd.dvb.notif-ia-registration-request+xml -application/vnd.dvb.notif-ia-registration-response+xml -application/vnd.dvb.notif-init+xml -application/vnd.dvb.pfr -application/vnd.dvb.service svc -application/vnd.dxr -application/vnd.dynageo geo -application/vnd.easykaraoke.cdgdownload -application/vnd.ecdis-update -application/vnd.ecowin.chart mag -application/vnd.ecowin.filerequest -application/vnd.ecowin.fileupdate -application/vnd.ecowin.series -application/vnd.ecowin.seriesrequest -application/vnd.ecowin.seriesupdate -application/vnd.emclient.accessrequest+xml -application/vnd.enliven nml -application/vnd.eprints.data+xml -application/vnd.epson.esf esf -application/vnd.epson.msf msf -application/vnd.epson.quickanime qam -application/vnd.epson.salt slt -application/vnd.epson.ssf ssf -application/vnd.ericsson.quickcall -application/vnd.eszigno3+xml es3 et3 -application/vnd.etsi.aoc+xml -application/vnd.etsi.cug+xml -application/vnd.etsi.iptvcommand+xml -application/vnd.etsi.iptvdiscovery+xml -application/vnd.etsi.iptvprofile+xml -application/vnd.etsi.iptvsad-bc+xml -application/vnd.etsi.iptvsad-cod+xml -application/vnd.etsi.iptvsad-npvr+xml -application/vnd.etsi.iptvservice+xml -application/vnd.etsi.iptvsync+xml -application/vnd.etsi.iptvueprofile+xml -application/vnd.etsi.mcid+xml -application/vnd.etsi.overload-control-policy-dataset+xml -application/vnd.etsi.sci+xml -application/vnd.etsi.simservs+xml -application/vnd.etsi.tsl+xml -application/vnd.etsi.tsl.der -application/vnd.eudora.data -application/vnd.ezpix-album ez2 -application/vnd.ezpix-package ez3 -application/vnd.f-secure.mobile -application/vnd.fdf fdf -application/vnd.fdsn.mseed mseed -application/vnd.fdsn.seed dataless seed -application/vnd.ffsns -application/vnd.fints -application/vnd.flographit gph -application/vnd.fluxtime.clip ftc -application/vnd.font-fontforge-sfd -application/vnd.framemaker book fm frame maker -application/vnd.frogans.fnc fnc -application/vnd.frogans.ltf ltf -application/vnd.fsc.weblaunch fsc -application/vnd.fujitsu.oasys oas -application/vnd.fujitsu.oasys2 oa2 -application/vnd.fujitsu.oasys3 oa3 -application/vnd.fujitsu.oasysgp fg5 -application/vnd.fujitsu.oasysprs bh2 -application/vnd.fujixerox.ART-EX -application/vnd.fujixerox.ART4 -application/vnd.fujixerox.HBPL -application/vnd.fujixerox.art-ex -application/vnd.fujixerox.art4 -application/vnd.fujixerox.ddd ddd -application/vnd.fujixerox.docuworks xdw -application/vnd.fujixerox.docuworks.binder xbd -application/vnd.fujixerox.hbpl -application/vnd.fut-misnet -application/vnd.fuzzysheet fzs -application/vnd.genomatix.tuxedo txd -application/vnd.geocube+xml -application/vnd.geogebra.file ggb -application/vnd.geogebra.tool ggt -application/vnd.geometry-explorer gex gre -application/vnd.geonext gxt -application/vnd.geoplan g2w -application/vnd.geospace g3w -application/vnd.globalplatform.card-content-mgt -application/vnd.globalplatform.card-content-mgt-response -application/vnd.gmx gmx -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq gqf gqs -application/vnd.gridmp -application/vnd.groove-account gac -application/vnd.groove-help ghf -application/vnd.groove-identity-message gim -application/vnd.groove-injector grv -application/vnd.groove-tool-message gtm -application/vnd.groove-tool-template tpl -application/vnd.groove-vcard vcg -application/vnd.hal+json -application/vnd.hal+xml hal -application/vnd.handheld-entertainment+xml zmm -application/vnd.hbci hbci -application/vnd.hcl-bireports -application/vnd.hhe.lesson-player les -application/vnd.hp-HPGL -application/vnd.hp-PCL -application/vnd.hp-PCLXL -application/vnd.hp-hpgl hpgl -application/vnd.hp-hpid hpid -application/vnd.hp-hps hps -application/vnd.hp-jlyt jlt -application/vnd.hp-pcl pcl -application/vnd.hp-pclxl pclxl -application/vnd.httphone -application/vnd.hydrostatix.sof-data sfd-hdstx -application/vnd.hzn-3d-crossword x3d -application/vnd.ibm.MiniPay -application/vnd.ibm.afplinedata -application/vnd.ibm.electronic-media -application/vnd.ibm.minipay mpy -application/vnd.ibm.modcap afp list3820 listafp -application/vnd.ibm.rights-management irm -application/vnd.ibm.secure-container sc -application/vnd.iccprofile icc icm -application/vnd.ieee.1905 -application/vnd.igloader igl -application/vnd.immervision-ivp ivp -application/vnd.immervision-ivu ivu -application/vnd.informedcontrol.rms+xml -application/vnd.informix-visionary -application/vnd.infotech.project -application/vnd.infotech.project+xml -application/vnd.innopath.wamp.notification -application/vnd.insors.igm igm -application/vnd.intercon.formnet xpw xpx -application/vnd.intergeo i2g -application/vnd.intertrust.digibox -application/vnd.intertrust.nncp -application/vnd.intu.qbo qbo -application/vnd.intu.qfx qfx -application/vnd.iptc.g2.conceptitem+xml -application/vnd.iptc.g2.knowledgeitem+xml -application/vnd.iptc.g2.newsitem+xml -application/vnd.iptc.g2.newsmessage+xml -application/vnd.iptc.g2.packageitem+xml -application/vnd.iptc.g2.planningitem+xml -application/vnd.ipunplugged.rcprofile rcprofile -application/vnd.irepository.package+xml irp -application/vnd.is-xpr xpr -application/vnd.isac.fcs fcs -application/vnd.jam jam -application/vnd.japannet-directory-service -application/vnd.japannet-jpnstore-wakeup -application/vnd.japannet-payment-wakeup -application/vnd.japannet-registration -application/vnd.japannet-registration-wakeup -application/vnd.japannet-setstore-wakeup -application/vnd.japannet-verification -application/vnd.japannet-verification-wakeup -application/vnd.jcp.javame.midlet-rms rms -application/vnd.jisp jisp -application/vnd.joost.joda-archive joda -application/vnd.jsk.isdn-ngn -application/vnd.kahootz ktr ktz -application/vnd.kde.karbon karbon -application/vnd.kde.kchart chrt -application/vnd.kde.kformula kfo -application/vnd.kde.kivio flw -application/vnd.kde.kontour kon -application/vnd.kde.kpresenter kpr kpt -application/vnd.kde.kspread ksp -application/vnd.kde.kword kwd kwt -application/vnd.kenameaapp htke -application/vnd.kidspiration kia -application/vnd.kinar kne knp -application/vnd.koan skd skm skp skt -application/vnd.kodak-descriptor sse -application/vnd.las.las+xml lasxml -application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop lbd -application/vnd.llamagraphics.life-balance.exchange+xml lbe -application/vnd.lotus-1-2-3 123 -application/vnd.lotus-approach apr -application/vnd.lotus-freelance pre -application/vnd.lotus-notes nsf -application/vnd.lotus-organizer org -application/vnd.lotus-screencam scm -application/vnd.lotus-wordpro lwp -application/vnd.macports.portpkg portpkg -application/vnd.marlin.drm.actiontoken+xml -application/vnd.marlin.drm.conftoken+xml -application/vnd.marlin.drm.license+xml -application/vnd.marlin.drm.mdcf -application/vnd.mcd mcd -application/vnd.medcalcdata mc1 -application/vnd.mediastation.cdkey cdkey -application/vnd.meridian-slingshot -application/vnd.mfer mwf -application/vnd.mfmp mfm -application/vnd.micrografx.flo flo -application/vnd.micrografx.igx igx -application/vnd.mif mif -application/vnd.minisoft-hp3000-save -application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf daf -application/vnd.mobius.dis dis -application/vnd.mobius.mbk mbk -application/vnd.mobius.mqy mqy -application/vnd.mobius.msl msl -application/vnd.mobius.plc plc -application/vnd.mobius.txf txf -application/vnd.mophun.application mpn -application/vnd.mophun.certificate mpc -application/vnd.motorola.flexsuite -application/vnd.motorola.flexsuite.adsi -application/vnd.motorola.flexsuite.fis -application/vnd.motorola.flexsuite.gotap -application/vnd.motorola.flexsuite.kmr -application/vnd.motorola.flexsuite.ttc -application/vnd.motorola.flexsuite.wem -application/vnd.motorola.iprm -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry cil -application/vnd.ms-asf -application/vnd.ms-cab-compressed cab -application/vnd.ms-excel xla xlb xlc xlm xls xlt xlw -application/vnd.ms-excel.addin.macroEnabled.12 xlam -application/vnd.ms-excel.addin.macroenabled.12 xlam -application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb -application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb -application/vnd.ms-excel.sheet.macroEnabled.12 xlsm -application/vnd.ms-excel.sheet.macroenabled.12 xlsm -application/vnd.ms-excel.template.macroEnabled.12 xltm -application/vnd.ms-excel.template.macroenabled.12 xltm -application/vnd.ms-fontobject eot -application/vnd.ms-htmlhelp chm -application/vnd.ms-ims ims -application/vnd.ms-lrm lrm -application/vnd.ms-office.activeX+xml -application/vnd.ms-officetheme thmx -application/vnd.ms-pki.seccat cat -application/vnd.ms-pki.stl stl -application/vnd.ms-playready.initiator+xml -application/vnd.ms-powerpoint pot pps ppt -application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam -application/vnd.ms-powerpoint.addin.macroenabled.12 ppam -application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm -application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm -application/vnd.ms-powerpoint.slide.macroEnabled.12 sldm -application/vnd.ms-powerpoint.slide.macroenabled.12 sldm -application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm -application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm -application/vnd.ms-powerpoint.template.macroEnabled.12 potm -application/vnd.ms-powerpoint.template.macroenabled.12 potm -application/vnd.ms-project mpp mpt -application/vnd.ms-tnef -application/vnd.ms-wmdrm.lic-chlg-req -application/vnd.ms-wmdrm.lic-resp -application/vnd.ms-wmdrm.meter-chlg-req -application/vnd.ms-wmdrm.meter-resp -application/vnd.ms-word.document.macroEnabled.12 docm -application/vnd.ms-word.document.macroenabled.12 docm -application/vnd.ms-word.template.macroEnabled.12 dotm -application/vnd.ms-word.template.macroenabled.12 dotm -application/vnd.ms-works wcm wdb wks wps -application/vnd.ms-wpl wpl -application/vnd.ms-xpsdocument xps -application/vnd.mseq mseq -application/vnd.msign -application/vnd.multiad.creator -application/vnd.multiad.creator.cif -application/vnd.music-niff -application/vnd.musician mus -application/vnd.muvee.style msty -application/vnd.mynfc taglet -application/vnd.ncd.control -application/vnd.ncd.reference -application/vnd.nervana -application/vnd.netfpx -application/vnd.neurolanguage.nlu nlu -application/vnd.nintendo.nitro.rom -application/vnd.nitf nitf ntf -application/vnd.noblenet-directory nnd -application/vnd.noblenet-sealer nns -application/vnd.noblenet-web nnw -application/vnd.nokia.catalogs -application/vnd.nokia.conml+wbxml -application/vnd.nokia.conml+xml -application/vnd.nokia.iSDS-radio-presets -application/vnd.nokia.iptv.config+xml -application/vnd.nokia.isds-radio-presets -application/vnd.nokia.landmark+wbxml -application/vnd.nokia.landmark+xml -application/vnd.nokia.landmarkcollection+xml -application/vnd.nokia.n-gage.ac+xml -application/vnd.nokia.n-gage.data ngdat -application/vnd.nokia.n-gage.symbian.install n-gage -application/vnd.nokia.ncd -application/vnd.nokia.pcd+wbxml -application/vnd.nokia.pcd+xml -application/vnd.nokia.radio-preset rpst -application/vnd.nokia.radio-presets rpss -application/vnd.novadigm.EDM -application/vnd.novadigm.EDX -application/vnd.novadigm.EXT -application/vnd.novadigm.edm edm -application/vnd.novadigm.edx edx -application/vnd.novadigm.ext ext -application/vnd.ntt-local.content-share -application/vnd.ntt-local.file-transfer -application/vnd.ntt-local.sip-ta_remote -application/vnd.ntt-local.sip-ta_tcp_stream -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.chart-template otc -application/vnd.oasis.opendocument.database odb -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.formula-template odft -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.image-template oti -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master odm otm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -application/vnd.obn -application/vnd.oftn.l10n+json -application/vnd.oipf.contentaccessdownload+xml -application/vnd.oipf.contentaccessstreaming+xml -application/vnd.oipf.cspg-hexbinary -application/vnd.oipf.dae.svg+xml -application/vnd.oipf.dae.xhtml+xml -application/vnd.oipf.mippvcontrolmessage+xml -application/vnd.oipf.pae.gem -application/vnd.oipf.spdiscovery+xml -application/vnd.oipf.spdlist+xml -application/vnd.oipf.ueprofile+xml -application/vnd.oipf.userprofile+xml -application/vnd.olpc-sugar xo -application/vnd.oma-scws-config -application/vnd.oma-scws-http-request -application/vnd.oma-scws-http-response -application/vnd.oma.bcast.associated-procedure-parameter+xml -application/vnd.oma.bcast.drm-trigger+xml -application/vnd.oma.bcast.imd+xml -application/vnd.oma.bcast.ltkm -application/vnd.oma.bcast.notification+xml -application/vnd.oma.bcast.provisioningtrigger -application/vnd.oma.bcast.sgboot -application/vnd.oma.bcast.sgdd+xml -application/vnd.oma.bcast.sgdu -application/vnd.oma.bcast.simple-symbol-container -application/vnd.oma.bcast.smartcard-trigger+xml -application/vnd.oma.bcast.sprov+xml -application/vnd.oma.bcast.stkm -application/vnd.oma.cab-address-book+xml -application/vnd.oma.cab-pcc+xml -application/vnd.oma.cab-subs-invite+xml -application/vnd.oma.cab-user-prefs+xml -application/vnd.oma.dcd -application/vnd.oma.dcdc -application/vnd.oma.dd2+xml dd2 -application/vnd.oma.drm.risd+xml -application/vnd.oma.group-usage-list+xml -application/vnd.oma.pal+xml -application/vnd.oma.poc.detailed-progress-report+xml -application/vnd.oma.poc.final-report+xml -application/vnd.oma.poc.groups+xml -application/vnd.oma.poc.invocation-descriptor+xml -application/vnd.oma.poc.optimized-progress-report+xml -application/vnd.oma.push -application/vnd.oma.scidm.messages+xml -application/vnd.oma.xcap-directory+xml -application/vnd.omads-email+xml -application/vnd.omads-file+xml -application/vnd.omads-folder+xml -application/vnd.omaloc-supl-init -application/vnd.openofficeorg.extension oxt -application/vnd.openxmlformats-officedocument.custom-properties+xml -application/vnd.openxmlformats-officedocument.customXmlProperties+xml -application/vnd.openxmlformats-officedocument.drawing+xml -application/vnd.openxmlformats-officedocument.drawingml.chart+xml -application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml -application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml -application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml -application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml -application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml -application/vnd.openxmlformats-officedocument.extended-properties+xml -application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml -application/vnd.openxmlformats-officedocument.presentationml.comments+xml -application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml -application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml -application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml -application/vnd.openxmlformats-officedocument.presentationml.presProps+xml -application/vnd.openxmlformats-officedocument.presentationml.presentation pptx -application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml -application/vnd.openxmlformats-officedocument.presentationml.slide sldx -application/vnd.openxmlformats-officedocument.presentationml.slide+xml -application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml -application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml -application/vnd.openxmlformats-officedocument.presentationml.slideUpdateInfo+xml -application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx -application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml -application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml -application/vnd.openxmlformats-officedocument.presentationml.tags+xml -application/vnd.openxmlformats-officedocument.presentationml.template potx -application/vnd.openxmlformats-officedocument.presentationml.template.main+xml -application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx -application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml -application/vnd.openxmlformats-officedocument.theme+xml -application/vnd.openxmlformats-officedocument.themeOverride+xml -application/vnd.openxmlformats-officedocument.vmlDrawing -application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.document docx -application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx -application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml -application/vnd.openxmlformats-package.core-properties+xml -application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml -application/vnd.openxmlformats-package.relationships+xml -application/vnd.orange.indata -application/vnd.osa.netdeploy -application/vnd.osgeo.mapguide.package mgp -application/vnd.osgi.bundle -application/vnd.osgi.dp dp -application/vnd.osgi.subsystem esa -application/vnd.otps.ct-kip+xml -application/vnd.palm oprc pdb pqa -application/vnd.paos.xml -application/vnd.pawaafile paw -application/vnd.pg.format str -application/vnd.pg.osasli ei6 -application/vnd.piaccess.application-licence -application/vnd.picsel efif -application/vnd.pmi.widget wg -application/vnd.poc.group-advertisement+xml -application/vnd.pocketlearn plf -application/vnd.powerbuilder6 pbd -application/vnd.powerbuilder6-s -application/vnd.powerbuilder7 -application/vnd.powerbuilder7-s -application/vnd.powerbuilder75 -application/vnd.powerbuilder75-s -application/vnd.preminet -application/vnd.previewsystems.box box -application/vnd.proteus.magazine mgz -application/vnd.publishare-delta-tree qps -application/vnd.pvi.ptid1 ptid -application/vnd.pwg-multiplexed -application/vnd.pwg-xhtml-print+xml -application/vnd.qualcomm.brew-app-res -application/vnd.quark.quarkxpress qwd qwt qxb qxd qxl qxt -application/vnd.quobject-quoxdocument -application/vnd.radisys.moml+xml -application/vnd.radisys.msml+xml -application/vnd.radisys.msml-audit+xml -application/vnd.radisys.msml-audit-conf+xml -application/vnd.radisys.msml-audit-conn+xml -application/vnd.radisys.msml-audit-dialog+xml -application/vnd.radisys.msml-audit-stream+xml -application/vnd.radisys.msml-conf+xml -application/vnd.radisys.msml-dialog+xml -application/vnd.radisys.msml-dialog-base+xml -application/vnd.radisys.msml-dialog-fax-detect+xml -application/vnd.radisys.msml-dialog-fax-sendrecv+xml -application/vnd.radisys.msml-dialog-group+xml -application/vnd.radisys.msml-dialog-speech+xml -application/vnd.radisys.msml-dialog-transform+xml -application/vnd.rainstor.data -application/vnd.rapid -application/vnd.realvnc.bed bed -application/vnd.recordare.musicxml mxl -application/vnd.recordare.musicxml+xml musicxml -application/vnd.renlearn.rlprint -application/vnd.rig.cryptonote cryptonote -application/vnd.rim.cod cod -application/vnd.rn-realmedia rm -application/vnd.rn-realmedia-vbr rmvb -application/vnd.route66.link66+xml link66 -application/vnd.rs-274x -application/vnd.ruckus.download -application/vnd.s3sms -application/vnd.sailingtracker.track st -application/vnd.sbm.cid -application/vnd.sbm.mid2 -application/vnd.scribus -application/vnd.sealed.3df -application/vnd.sealed.csf -application/vnd.sealed.doc -application/vnd.sealed.eml -application/vnd.sealed.mht -application/vnd.sealed.net -application/vnd.sealed.ppt -application/vnd.sealed.tiff -application/vnd.sealed.xls -application/vnd.sealedmedia.softseal.html -application/vnd.sealedmedia.softseal.pdf -application/vnd.seemail see -application/vnd.sema sema -application/vnd.semd semd -application/vnd.semf semf -application/vnd.shana.informed.formdata ifm -application/vnd.shana.informed.formtemplate itp -application/vnd.shana.informed.interchange iif -application/vnd.shana.informed.package ipk -application/vnd.simtech-mindmapper twd twds -application/vnd.smaf mmf -application/vnd.smart.notebook -application/vnd.smart.teacher teacher -application/vnd.software602.filler.form+xml -application/vnd.software602.filler.form-xml-zip -application/vnd.solent.sdkm+xml sdkd sdkm -application/vnd.spotfire.dxp dxp -application/vnd.spotfire.sfs sfs -application/vnd.sss-cod -application/vnd.sss-dtf -application/vnd.sss-ntf -application/vnd.stardivision.calc sdc -application/vnd.stardivision.chart sds -application/vnd.stardivision.draw sda -application/vnd.stardivision.impress sdd sdp -application/vnd.stardivision.math sdf smf -application/vnd.stardivision.writer sdw vor -application/vnd.stardivision.writer-global sgl -application/vnd.stepmania.package smzip -application/vnd.stepmania.stepchart sm -application/vnd.street-stream -application/vnd.sun.wadl+xml -application/vnd.sun.xml.calc sxc -application/vnd.sun.xml.calc.template stc -application/vnd.sun.xml.draw sxd -application/vnd.sun.xml.draw.template std -application/vnd.sun.xml.impress sxi -application/vnd.sun.xml.impress.template sti -application/vnd.sun.xml.math sxm -application/vnd.sun.xml.writer sxw -application/vnd.sun.xml.writer.global sxg -application/vnd.sun.xml.writer.template stw -application/vnd.sus-calendar sus susp -application/vnd.svd svd -application/vnd.swiftview-ics -application/vnd.symbian.install sis sisx -application/vnd.syncml+xml xsm -application/vnd.syncml.dm+wbxml bdm -application/vnd.syncml.dm+xml xdm -application/vnd.syncml.dm.notification -application/vnd.syncml.dmddf+wbxml -application/vnd.syncml.dmddf+xml -application/vnd.syncml.dmtnds+wbxml -application/vnd.syncml.dmtnds+xml -application/vnd.syncml.ds.notification -application/vnd.tao.intent-module-archive tao -application/vnd.tcpdump.pcap cap dmp pcap -application/vnd.tmobile-livetv tmo -application/vnd.trid.tpt tpt -application/vnd.triscape.mxs mxs -application/vnd.trueapp tra -application/vnd.truedoc -application/vnd.tve-trigger -application/vnd.ubisoft.webplayer -application/vnd.ufdl ufd ufdl -application/vnd.uiq.theme utz -application/vnd.umajin umj -application/vnd.unity unityweb -application/vnd.uoml+xml uoml -application/vnd.uplanet.alert -application/vnd.uplanet.alert-wbxml -application/vnd.uplanet.bearer-choice -application/vnd.uplanet.bearer-choice-wbxml -application/vnd.uplanet.cacheop -application/vnd.uplanet.cacheop-wbxml -application/vnd.uplanet.channel -application/vnd.uplanet.channel-wbxml -application/vnd.uplanet.list -application/vnd.uplanet.list-wbxml -application/vnd.uplanet.listcmd -application/vnd.uplanet.listcmd-wbxml -application/vnd.uplanet.signal -application/vnd.vcx vcx -application/vnd.vd-study -application/vnd.vectorworks -application/vnd.verimatrix.vcas -application/vnd.vidsoft.vidconference -application/vnd.visio vsd vss vst vsw -application/vnd.visionary vis -application/vnd.vividence.scriptfile -application/vnd.vsf vsf -application/vnd.wap.sic -application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo wtb -application/vnd.wfa.wsc -application/vnd.wmc -application/vnd.wmf.bootstrap -application/vnd.wolfram.mathematica -application/vnd.wolfram.mathematica.package -application/vnd.wolfram.player nbp -application/vnd.wordperfect wpd -application/vnd.wordperfect5.1 wp5 -application/vnd.wqd wqd -application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf stf -application/vnd.wv.csp+wbxml -application/vnd.wv.csp+xml -application/vnd.wv.ssp+xml -application/vnd.xara xar -application/vnd.xfdl xfdl -application/vnd.xfdl.webform -application/vnd.xmi+xml -application/vnd.xmpie.cpkg -application/vnd.xmpie.dpkg -application/vnd.xmpie.plan -application/vnd.xmpie.ppkg -application/vnd.xmpie.xlim -application/vnd.yamaha.hv-dic hvd -application/vnd.yamaha.hv-script hvs -application/vnd.yamaha.hv-voice hvp -application/vnd.yamaha.openscoreformat osf -application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg -application/vnd.yamaha.remote-setup -application/vnd.yamaha.smaf-audio saf -application/vnd.yamaha.smaf-phrase spf -application/vnd.yamaha.through-ngn -application/vnd.yamaha.tunnel-udpencap -application/vnd.yellowriver-custom-menu cmp -application/vnd.zul zir zirz -application/vnd.zzazz.deck+xml zaz -application/voicexml+xml vxml -application/vq-rtcpxr -application/watcherinfo+xml -application/whoispp-query -application/whoispp-response -application/widget wgt -application/winhlp hlp -application/wita -application/wordperfect wpd -application/wordperfect5.1 wp5 -application/wsdl+xml wsdl -application/wspolicy+xml wspolicy -application/x-123 wk -application/x-7z-compressed 7z -application/x-abiword abw -application/x-ace-compressed ace -application/x-apple-diskimage dmg -application/x-authorware-bin aab u32 vox x32 -application/x-authorware-map aam -application/x-authorware-seg aas -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-blorb blb blorb -application/x-bzip bz -application/x-bzip2 boz bz2 -application/x-cab cab -application/x-cbr cb7 cba cbr cbt cbz -application/x-cbz cbz -application/x-cdf cda cdf -application/x-cdlink vcd -application/x-cfs-compressed cfs -application/x-chat chat -application/x-chess-pgn pgn -application/x-compress -application/x-comsol mph -application/x-conference nsc -application/x-core -application/x-cpio cpio -application/x-csh csh -application/x-debian-package deb udeb -application/x-dgc-compressed dgc -application/x-director cct cst cxt dcr dir dxr fgd swa w3d -application/x-dms dms -application/x-doom wad -application/x-dtbncx+xml ncx -application/x-dtbook+xml dtb -application/x-dtbresource+xml res -application/x-dvi dvi -application/x-envoy evy -application/x-eva eva -application/x-executable -application/x-flac flac -application/x-font gsf pcf pcf.Z pfa pfb -application/x-font-bdf bdf -application/x-font-dos -application/x-font-framemaker -application/x-font-ghostscript gsf -application/x-font-libgrx -application/x-font-linux-psf psf -application/x-font-otf otf -application/x-font-pcf pcf -application/x-font-snf snf -application/x-font-speedo -application/x-font-sunos-news -application/x-font-ttf ttc ttf -application/x-font-type1 afm pfa pfb pfm -application/x-font-vfont -application/x-font-woff woff -application/x-freearc arc -application/x-freemind mm -application/x-futuresplash spl -application/x-ganttproject gan -application/x-gca-compressed gca -application/x-glulx ulx -application/x-gnumeric gnumeric -application/x-go-sgf sgf -application/x-gramps-xml gramps -application/x-graphing-calculator gcf -application/x-gtar gtar taz tgz -application/x-gtar-compressed taz tgz -application/x-gzip -application/x-hdf hdf -application/x-hwp hwp -application/x-ica ica -application/x-info info -application/x-install-instructions install -application/x-internet-signup ins isp -application/x-iphone iii -application/x-iso9660-image iso -application/x-jam jam -application/x-java-applet -application/x-java-bean -application/x-java-jnlp-file jnlp -application/x-javascript js -application/x-jmol jmz -application/x-kchart chrt -application/x-kdelnk -application/x-killustrator kil -application/x-koan skd skm skp skt -application/x-kpresenter kpr kpt -application/x-kspread ksp -application/x-kword kwd kwt -application/x-latex latex -application/x-lha lha -application/x-lyx lyx -application/x-lzh lzh -application/x-lzh-compressed lha lzh -application/x-lzx lzx -application/x-maker book fb fbdoc fm frame frm maker -application/x-md5 md5 -application/x-mie mie -application/x-mif mif -application/x-mobipocket-ebook mobi prc -application/x-mpegURL m3u8 -application/x-ms-application application -application/x-ms-shortcut lnk -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-ms-xbap xbap -application/x-msaccess mdb -application/x-msbinder obd -application/x-mscardfile crd -application/x-msclip clp -application/x-msdos-program bat com dll exe -application/x-msdownload bat com dll exe msi -application/x-msi msi -application/x-msmediaview m13 m14 mvb -application/x-msmetafile emf emz wmf wmz -application/x-msmoney mny -application/x-mspublisher pub -application/x-msschedule scd -application/x-msterminal trm -application/x-mswrite wri -application/x-netcdf cdf nc -application/x-ns-proxy-autoconfig dat pac -application/x-nwc nwc -application/x-nzb nzb -application/x-object o -application/x-oz-application oza -application/x-pkcs12 p12 pfx -application/x-pkcs7-certificates p7b spc -application/x-pkcs7-certreqresp p7r -application/x-pkcs7-crl crl -application/x-python-code pyc pyo -application/x-qgis qgs shp shx -application/x-quicktimeplayer qtl -application/x-rar-compressed rar -application/x-rdp rdp -application/x-redhat-package-manager rpm -application/x-research-info-systems ris -application/x-rss+xml rss -application/x-ruby rb -application/x-rx -application/x-scilab sce sci -application/x-scilab-xcos xcos -application/x-sh sh -application/x-sha1 sha1 -application/x-shar shar -application/x-shellscript -application/x-shockwave-flash swf swfl -application/x-silverlight scr -application/x-silverlight-app xap -application/x-sql sql -application/x-stuffit sit sitx -application/x-stuffitx sitx -application/x-subrip srt -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-t3vm-image t3 -application/x-tads gam -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-tex-gf gf -application/x-tex-pk pk -application/x-tex-tfm tfm -application/x-texinfo texi texinfo -application/x-tgif obj -application/x-trash % bak old sik ~ -application/x-troff roff t tr -application/x-troff-man man -application/x-troff-me me -application/x-troff-ms ms -application/x-ustar ustar -application/x-videolan -application/x-wais-source src -application/x-wingz wz -application/x-x509-ca-cert crt der -application/x-xcf xcf -application/x-xfig fig -application/x-xliff+xml xlf -application/x-xpinstall xpi -application/x-xz xz -application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 -application/x400-bp -application/xaml+xml xaml -application/xcap-att+xml -application/xcap-caps+xml -application/xcap-diff+xml xdf -application/xcap-el+xml -application/xcap-error+xml -application/xcap-ns+xml -application/xcon-conference-info+xml -application/xcon-conference-info-diff+xml -application/xenc+xml xenc -application/xhtml+xml xht xhtml -application/xhtml-voice+xml -application/xml xml xsd xsl -application/xml-dtd dtd -application/xml-external-parsed-entity -application/xmpp+xml -application/xop+xml xop -application/xproc+xml xpl -application/xslt+xml xslt -application/xspf+xml xspf -application/xv+xml mxml xhvml xvm xvml -application/yang yang -application/yin+xml yin -application/zip zip -application/zlib -audio/1d-interleaved-parityfec -audio/32kadpcm -audio/3gpp -audio/3gpp2 -audio/AMR -audio/AMR-WB -audio/ATRAC-ADVANCED-LOSSLESS -audio/ATRAC-X -audio/ATRAC3 -audio/BV16 -audio/BV32 -audio/CN -audio/DAT12 -audio/DV -audio/DVI4 -audio/EVRC -audio/EVRC-QCP -audio/EVRC0 -audio/EVRC1 -audio/EVRCB -audio/EVRCB0 -audio/EVRCB1 -audio/EVRCWB -audio/EVRCWB0 -audio/EVRCWB1 -audio/G719 -audio/G722 -audio/G7221 -audio/G723 -audio/G726-16 -audio/G726-24 -audio/G726-32 -audio/G726-40 -audio/G728 -audio/G729 -audio/G7291 -audio/G729D -audio/G729E -audio/GSM -audio/GSM-EFR -audio/GSM-HR-08 -audio/L16 -audio/L20 -audio/L24 -audio/L8 -audio/LPC -audio/MP4A-LATM -audio/MPA -audio/PCMA -audio/PCMA-WB -audio/PCMU -audio/PCMU-WB -audio/QCELP -audio/RED -audio/SMV -audio/SMV-QCP -audio/SMV0 -audio/UEMCLIP -audio/VDVI -audio/VMR-WB -audio/ac3 -audio/adpcm adp -audio/amr amr -audio/amr-wb awb -audio/amr-wb+ -audio/annodex axa -audio/asc -audio/basic au snd -audio/bv16 -audio/bv32 -audio/clearmode -audio/cn -audio/csound csd orc sco -audio/dat12 -audio/dls -audio/dsr-es201108 -audio/dsr-es202050 -audio/dsr-es202211 -audio/dsr-es202212 -audio/dvi4 -audio/eac3 -audio/evrc -audio/evrc-qcp -audio/evrc0 -audio/evrc1 -audio/evrcb -audio/evrcb0 -audio/evrcb1 -audio/evrcwb -audio/evrcwb0 -audio/evrcwb1 -audio/example -audio/flac flac -audio/fwdred -audio/g.722.1 -audio/g719 -audio/g722 -audio/g7221 -audio/g723 -audio/g726-16 -audio/g726-24 -audio/g726-32 -audio/g726-40 -audio/g728 -audio/g729 -audio/g7291 -audio/g729d -audio/g729e -audio/gsm -audio/gsm-efr -audio/iLBC -audio/ilbc -audio/ip-mr_v2.5 -audio/l16 -audio/l20 -audio/l24 -audio/l8 -audio/lpc -audio/midi kar mid midi rmi -audio/mobile-xmf -audio/mp4 mp4a -audio/mp4a-latm -audio/mpa -audio/mpa-robust -audio/mpeg m2a m3a m4a mp2 mp2a mp3 mpega mpga -audio/mpeg4-generic -audio/mpegurl m3u -audio/ogg oga ogg opus spx -audio/parityfec -audio/pcma -audio/pcma-wb -audio/pcmu -audio/pcmu-wb -audio/prs.sid sid -audio/qcelp -audio/raptorfec -audio/red -audio/rtp-enc-aescm128 -audio/rtp-midi -audio/rtx -audio/s3m s3m -audio/silk sil -audio/smv -audio/smv-qcp -audio/smv0 -audio/sp-midi -audio/speex -audio/t140c -audio/t38 -audio/telephone-event -audio/tone -audio/ulpfec -audio/vdvi -audio/vmr-wb -audio/vnd.3gpp.iufp -audio/vnd.4SB -audio/vnd.4sb -audio/vnd.CELP -audio/vnd.audiokoz -audio/vnd.celp -audio/vnd.cisco.nse -audio/vnd.cmles.radio-events -audio/vnd.cns.anp1 -audio/vnd.cns.inf1 -audio/vnd.dece.audio uva uvva -audio/vnd.digital-winds eol -audio/vnd.dlna.adts -audio/vnd.dolby.heaac.1 -audio/vnd.dolby.heaac.2 -audio/vnd.dolby.mlp -audio/vnd.dolby.mps -audio/vnd.dolby.pl2 -audio/vnd.dolby.pl2x -audio/vnd.dolby.pl2z -audio/vnd.dolby.pulse.1 -audio/vnd.dra dra -audio/vnd.dts dts -audio/vnd.dts.hd dtshd -audio/vnd.dvb.file -audio/vnd.everad.plj -audio/vnd.hns.audio -audio/vnd.lucent.voice lvp -audio/vnd.ms-playready.media.pya pya -audio/vnd.nokia.mobile-xmf -audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 ecelp4800 -audio/vnd.nuera.ecelp7470 ecelp7470 -audio/vnd.nuera.ecelp9600 ecelp9600 -audio/vnd.octel.sbc -audio/vnd.qcelp -audio/vnd.rhetorex.32kadpcm -audio/vnd.rip rip -audio/vnd.sealedmedia.softseal.mpeg -audio/vnd.vmx.cvsd -audio/vorbis -audio/vorbis-config -audio/webm weba -audio/x-aac aac -audio/x-aiff aif aifc aiff -audio/x-caf caf -audio/x-flac flac -audio/x-gsm gsm -audio/x-matroska mka -audio/x-mpegurl m3u -audio/x-ms-wax wax -audio/x-ms-wma wma -audio/x-pn-realaudio ra ram rm -audio/x-pn-realaudio-plugin rmp -audio/x-realaudio ra -audio/x-scpls pls -audio/x-sd2 sd2 -audio/x-wav wav -audio/xm xm -chemical/x-alchemy alc -chemical/x-cache cac cache -chemical/x-cache-csf csf -chemical/x-cactvs-binary cascii cbin ctab -chemical/x-cdx cdx -chemical/x-cerius cer -chemical/x-chem3d c3d -chemical/x-chemdraw chm -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-compass cpa -chemical/x-crossfire bsd -chemical/x-csml csm csml -chemical/x-ctx ctx -chemical/x-cxf cef cxf -chemical/x-embl-dl-nucleotide emb embl -chemical/x-galactic-spc spc -chemical/x-gamess-input gam gamin inp -chemical/x-gaussian-checkpoint fch fchk -chemical/x-gaussian-cube cub -chemical/x-gaussian-input gau gjc gjf -chemical/x-gaussian-log gal -chemical/x-gcg8-sequence gcg -chemical/x-genbank gen -chemical/x-hin hin -chemical/x-isostar ist istr -chemical/x-jcamp-dx dx jdx -chemical/x-kinemage kin -chemical/x-macmolecule mcm -chemical/x-macromodel-input mmd mmod -chemical/x-mdl-molfile mol -chemical/x-mdl-rdfile rd -chemical/x-mdl-rxnfile rxn -chemical/x-mdl-sdfile sd sdf -chemical/x-mdl-tgf tgf -chemical/x-mmcif mcif -chemical/x-mol2 mol2 -chemical/x-molconn-Z b -chemical/x-mopac-graph gpt -chemical/x-mopac-input dat mop mopcrt mpc zmt -chemical/x-mopac-out moo -chemical/x-mopac-vib mvb -chemical/x-ncbi-asn1 asn -chemical/x-ncbi-asn1-ascii ent prt -chemical/x-ncbi-asn1-binary aso val -chemical/x-ncbi-asn1-spec asn -chemical/x-pdb ent pdb -chemical/x-rosdal ros -chemical/x-swissprot sw -chemical/x-vamas-iso14976 vms -chemical/x-vmd vmd -chemical/x-xtel xtel -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -image/example -image/fits -image/g3fax g3 -image/gif gif -image/ief ief -image/jp2 -image/jpeg jpe jpeg jpg -image/jpm -image/jpx -image/ktx ktx -image/naplps -image/pcx pcx -image/png png -image/prs.btif btif -image/prs.pti -image/pwg-raster -image/sgi sgi -image/svg+xml svg svgz -image/t38 -image/tiff tif tiff -image/tiff-fx -image/vnd.adobe.photoshop psd -image/vnd.airzip.accelerator.azv -image/vnd.cns.inf2 -image/vnd.dece.graphic uvg uvi uvvg uvvi -image/vnd.djvu djv djvu -image/vnd.dvb.subtitle sub -image/vnd.dwg dwg -image/vnd.dxf dxf -image/vnd.fastbidsheet fbs -image/vnd.fpx fpx -image/vnd.fst fst -image/vnd.fujixerox.edmics-mmr mmr -image/vnd.fujixerox.edmics-rlc rlc -image/vnd.globalgraphics.pgb -image/vnd.microsoft.icon ico -image/vnd.mix -image/vnd.ms-modi mdi -image/vnd.ms-photo wdp -image/vnd.net-fpx npx -image/vnd.radiance -image/vnd.sealed.png -image/vnd.sealedmedia.softseal.gif -image/vnd.sealedmedia.softseal.jpg -image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff xif -image/webp webp -image/x-3ds 3ds -image/x-canon-cr2 cr2 -image/x-canon-crw crw -image/x-cmu-raster ras -image/x-cmx cmx -image/x-coreldraw cdr -image/x-coreldrawpattern pat -image/x-coreldrawtemplate cdt -image/x-corelphotopaint cpt -image/x-epson-erf erf -image/x-freehand fh fh4 fh5 fh7 fhc -image/x-icon ico -image/x-jg art -image/x-jng jng -image/x-mrsid-image sid -image/x-ms-bmp bmp -image/x-nikon-nef nef -image/x-olympus-orf orf -image/x-pcx pcx -image/x-photoshop psd -image/x-pict pct pic -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-tga tga -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -inode/blockdevice -inode/chardevice -inode/directory -inode/directory-locked -inode/fifo -inode/socket -message/CPIM -message/cpim -message/delivery-status -message/disposition-notification -message/example -message/external-body -message/feedback-report -message/global -message/global-delivery-status -message/global-disposition-notification -message/global-headers -message/http -message/imdn+xml -message/news -message/partial -message/rfc822 eml mime -message/s-http -message/sip -message/sipfrag -message/tracking-status -message/vnd.si.simp -model/example -model/iges iges igs -model/mesh mesh msh silo -model/vnd.collada+xml dae -model/vnd.dwf dwf -model/vnd.flatland.3dml -model/vnd.gdl gdl -model/vnd.gs-gdl -model/vnd.gs.gdl -model/vnd.gtw gtw -model/vnd.moml+xml -model/vnd.mts mts -model/vnd.parasolid.transmit.binary -model/vnd.parasolid.transmit.text -model/vnd.vtu vtu -model/vrml vrml wrl -model/x3d+binary x3db x3dbz -model/x3d+vrml x3dv x3dvz -model/x3d+xml x3d x3dz -multipart/alternative -multipart/appledouble -multipart/byteranges -multipart/digest -multipart/encrypted -multipart/example -multipart/form-data -multipart/header-set -multipart/mixed -multipart/parallel -multipart/related -multipart/report -multipart/signed -multipart/voice-message -text/cache-manifest appcache -text/calendar ics icz ifb -text/comma-separated-values csv -text/css css -text/csv csv -text/directory -text/dns -text/ecmascript -text/english -text/enriched -text/example -text/h323 323 -text/html htm html shtml -text/iuls uls -text/javascript -text/mathml mml -text/n3 n3 -text/parityfec -text/plain asc brf conf def diff in list log pot srt text txt -text/prs.fallenstein.rst -text/prs.lines.tag dsc -text/red -text/rfc822-headers -text/richtext rtx -text/rtf rtf -text/rtp-enc-aescm128 -text/rtx -text/scriptlet sct wsc -text/sgml sgm sgml -text/t140 -text/tab-separated-values tsv -text/texmacs tm ts -text/troff man me ms roff t tr -text/turtle ttl -text/ulpfec -text/uri-list uri uris urls -text/vcard vcard -text/vnd.DMClientScript -text/vnd.IPTC.NITF -text/vnd.IPTC.NewsML -text/vnd.abc -text/vnd.curl curl -text/vnd.curl.dcurl dcurl -text/vnd.curl.mcurl mcurl -text/vnd.curl.scurl scurl -text/vnd.dmclientscript -text/vnd.dvb.subtitle sub -text/vnd.esmertec.theme-descriptor -text/vnd.flatland.3dml -text/vnd.fly fly -text/vnd.fmi.flexstor flx -text/vnd.graphviz gv -text/vnd.in3d.3dml 3dml -text/vnd.in3d.spot spot -text/vnd.iptc.newsml -text/vnd.iptc.nitf -text/vnd.latex-z -text/vnd.motorola.reflex -text/vnd.ms-mediapackage -text/vnd.net2phone.commcenter.command -text/vnd.si.uricatalogue -text/vnd.sun.j2me.app-descriptor jad -text/vnd.trolltech.linguist -text/vnd.wap.si -text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-asm asm s -text/x-bibtex bib -text/x-boo boo -text/x-c c cc cpp cxx dic h hh -text/x-c++hdr h++ hh hpp hxx -text/x-c++src c++ cc cpp cxx -text/x-chdr h -text/x-component htc -text/x-crontab -text/x-csh csh -text/x-csrc c -text/x-diff diff patch -text/x-dsrc d -text/x-fortran f f77 f90 for -text/x-haskell hs -text/x-java java -text/x-java-source java -text/x-lilypond ly -text/x-literate-haskell lhs -text/x-makefile -text/x-moc moc -text/x-nfo nfo -text/x-opml opml -text/x-pascal p pas -text/x-pcs-gcd gcd -text/x-perl pl pm -text/x-psp psp -text/x-python py -text/x-scala scala -text/x-server-parsed-html -text/x-setext etx -text/x-sfv sfv -text/x-sh sh -text/x-tcl tcl tk -text/x-tex cls ltx sty tex -text/x-uuencode uu -text/x-vcalendar vcs -text/x-vcard vcf -text/xml -text/xml-external-parsed-entity -video/1d-interleaved-parityfec -video/3gpp 3gp -video/3gpp-tt -video/3gpp2 3g2 -video/BMPEG -video/BT656 -video/CelB -video/DV -video/H261 -video/H263 -video/H263-1998 -video/H263-2000 -video/H264 -video/H264-RCDO -video/H264-SVC -video/JPEG -video/MJ2 -video/MP1S -video/MP2P -video/MP2T ts -video/MP4V-ES -video/MPV -video/SMPTE292M -video/annodex axv -video/bmpeg -video/bt656 -video/celb -video/dl dl -video/dv dif dv -video/example -video/fli fli -video/gl gl -video/h261 h261 -video/h263 h263 -video/h263-1998 -video/h263-2000 -video/h264 h264 -video/jpeg jpgv -video/jpeg2000 -video/jpm jpgm jpm -video/mj2 mj2 mjp2 -video/mp1s -video/mp2p -video/mp2t -video/mp4 mp4 mp4v mpg4 -video/mp4v-es -video/mpeg m1v m2v mpe mpeg mpg -video/mpeg4-generic -video/mpv -video/nv -video/ogg ogv -video/parityfec -video/pointer -video/quicktime mov qt -video/raptorfec -video/raw -video/rtp-enc-aescm128 -video/rtx -video/smpte292m -video/ulpfec -video/vc1 -video/vnd.CCTV -video/vnd.cctv -video/vnd.dece.hd uvh uvvh -video/vnd.dece.mobile uvm uvvm -video/vnd.dece.mp4 -video/vnd.dece.pd uvp uvvp -video/vnd.dece.sd uvs uvvs -video/vnd.dece.video uvv uvvv -video/vnd.directv.mpeg -video/vnd.directv.mpeg-tts -video/vnd.dlna.mpeg-tts -video/vnd.dvb.file dvb -video/vnd.fvt fvt -video/vnd.hns.video -video/vnd.iptvforum.1dparityfec-1010 -video/vnd.iptvforum.1dparityfec-2005 -video/vnd.iptvforum.2dparityfec-1010 -video/vnd.iptvforum.2dparityfec-2005 -video/vnd.iptvforum.ttsavc -video/vnd.iptvforum.ttsmpeg2 -video/vnd.motorola.video -video/vnd.motorola.videop -video/vnd.mpegurl m4u mxu -video/vnd.ms-playready.media.pyv pyv -video/vnd.mts -video/vnd.nokia.interleaved-multimedia -video/vnd.nokia.videovoip -video/vnd.objectvideo -video/vnd.sealed.mpeg1 -video/vnd.sealed.mpeg4 -video/vnd.sealed.swf -video/vnd.sealedmedia.softseal.mov -video/vnd.uvvu.mp4 uvu uvvu -video/vnd.vivo viv -video/webm webm -video/x-f4v f4v -video/x-fli fli -video/x-flv flv -video/x-la-asf lsf lsx -video/x-m4v m4v -video/x-matroska mk3d mks mkv mpv -video/x-mng mng -video/x-ms-asf asf asx -video/x-ms-vob vob -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie -video/x-smv smv -x-conference/x-cooltalk ice -x-epoc/x-sisx-app sisx -x-world/x-vrml vrm vrml wrl diff --git a/nix/trivial-mimes.nix b/nix/trivial-mimes.nix deleted file mode 100644 index 7a5cdfa..0000000 --- a/nix/trivial-mimes.nix +++ /dev/null @@ -1,101 +0,0 @@ -{ mime-types, pkgs ? import {} }: - -pkgs.writeText "trivial-mimes.lisp" '' -#| - This file is a part of Trivial-Mimes - (c) 2014 Shirakumo http://tymoon.eu (shinmera@tymoon.eu) - Author: Nicolas Hafner -|# - -(defpackage #:trivial-mimes - (:nicknames #:mimes #:org.tymoonnext.trivial-mimes) - (:use #:cl) - (:export - #:*mime-db* - - #:find-mime.types - #:mime-probe - #:mime-lookup - #:mime - #:mime-file-type)) -(in-package #:org.tymoonnext.trivial-mimes) - - -(defun find-mime.types () - "Attempts to find a usable MIME.TYPES file. -If none can be found, an error is signalled." - (or (loop for file in (list #p"${mime-types}" - #+asdf (merge-pathnames "mime.types" (asdf:system-source-directory :trivial-mimes))) - thereis (probe-file file)) - (error "No MIME.TYPES file found anywhere!"))) - -(defvar *mime-db* (make-hash-table :test 'equalp) - "An EQUALP hash-table with file-extensions as keys and the mime-types as values.") -(defvar *reverse-mime-db* (make-hash-table :test 'equalp) - "An EQUALP hash-table with mime-types as keys and the file-extensions as values.") - -(defun whitespace-p (char) - (find char '(#\Space #\Newline #\Backspace #\Tab #\Linefeed #\Page #\Return #\Rubout))) - -(defun %read-tokens (line) - (let ((tokens) - (start)) - (dotimes (i (length line)) - (let ((char (aref line i))) - (cond - ((and start (whitespace-p char)) - (push (subseq line start i) tokens) - (setf start NIL)) - ((not (or start (whitespace-p char))) - (setf start i))))) - (when start (push (subseq line start) tokens)) - (nreverse tokens))) - -(defun build-mime-db (&optional (file (find-mime.types))) - "Populates the *MIME-DB* with data gathered from the file. -The file should have the following structure: - -MIME-TYPE FILE-EXTENSION*" - (with-open-file (stream file :direction :input) - (loop for line = (read-line stream NIL) - while line - for tokens = (%read-tokens line) - do (dolist (ending (cdr tokens)) - (setf (gethash ending *mime-db*) (car tokens))) - (setf (gethash (first tokens) *reverse-mime-db*) (second tokens))))) -(build-mime-db) - -(defun mime-probe (pathname) - "Attempts to get the mime-type through a call to the FILE shell utility. -If the file does not exist or the platform is not unix, NIL is returned." - #+unix - (when (probe-file pathname) - (let ((output (uiop:run-program (list "file" #+darwin "-bI" #-darwin "-bi" - (uiop:native-namestring pathname)) - :output :string))) - (with-output-to-string (mime) - (loop for c across output - for char = (char-downcase c) - ;; Allowed characters as per RFC6383 - while (find char "abcdefghijklmnopqrstuvwxyz0123456789!#$&-^_.+/") - do (write-char char mime))))) - #-unix - NIL) - -(defun mime-lookup (pathname) - "Attempts to get the mime-type by file extension comparison. -If none can be found, NIL is returned." - (gethash (pathname-type pathname) *mime-db*)) - -(defun mime (pathname &optional (default "application/octet-stream")) - "Attempts to detect the mime-type of the given pathname. -First uses MIME-LOOKUP, then MIME-PROBE and lastly returns the DEFAULT if both fail." - (or (mime-lookup pathname) - (mime-probe pathname) - default)) - -(defun mime-file-type (mime-type) - "Returns a matching file-extension for the given mime-type. -If the given mime-type cannot be found, NIL is returned." - (gethash mime-type *reverse-mime-db*)) -''