From 5018df5ff8fda1558684c991b51a58d944d9ca45 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 22 Feb 2024 18:33:57 -0500 Subject: [PATCH] fix: avoid collisions in `Mime_` private module --- src/Tiny_httpd_dir.ml | 2 +- src/{mime_.dummy.ml => Tiny_httpd_mime_.dummy.ml} | 0 src/{mime_.magic.ml => Tiny_httpd_mime_.magic.ml} | 0 src/{mime_.mli => Tiny_httpd_mime_.mli} | 0 src/dune | 8 ++++---- 5 files changed, 5 insertions(+), 5 deletions(-) rename src/{mime_.dummy.ml => Tiny_httpd_mime_.dummy.ml} (100%) rename src/{mime_.magic.ml => Tiny_httpd_mime_.magic.ml} (100%) rename src/{mime_.mli => Tiny_httpd_mime_.mli} (100%) diff --git a/src/Tiny_httpd_dir.ml b/src/Tiny_httpd_dir.ml index 2252c678..c619c217 100644 --- a/src/Tiny_httpd_dir.ml +++ b/src/Tiny_httpd_dir.ml @@ -315,7 +315,7 @@ let add_vfs_ ~on_fs ~top ~config ~vfs:((module VFS : VFS) as vfs) ~prefix server [ "Content-Type", "text/javascript" ] else if on_fs then ( (* call "file" util *) - let ty = Mime_.mime_of_path (top // path) in + let ty = Tiny_httpd_mime_.mime_of_path (top // path) in [ "content-type", ty ] ) else [] diff --git a/src/mime_.dummy.ml b/src/Tiny_httpd_mime_.dummy.ml similarity index 100% rename from src/mime_.dummy.ml rename to src/Tiny_httpd_mime_.dummy.ml diff --git a/src/mime_.magic.ml b/src/Tiny_httpd_mime_.magic.ml similarity index 100% rename from src/mime_.magic.ml rename to src/Tiny_httpd_mime_.magic.ml diff --git a/src/mime_.mli b/src/Tiny_httpd_mime_.mli similarity index 100% rename from src/mime_.mli rename to src/Tiny_httpd_mime_.mli diff --git a/src/dune b/src/dune index fca51e45..eee6fef7 100644 --- a/src/dune +++ b/src/dune @@ -1,11 +1,11 @@ (library (name tiny_httpd) (public_name tiny_httpd) - (private_modules mime_) + (private_modules Tiny_httpd_mime_) (libraries threads seq unix - (select mime_.ml from - (magic-mime -> mime_.magic.ml) - ( -> mime_.dummy.ml)) + (select Tiny_httpd_mime_.ml from + (magic-mime -> Tiny_httpd_mime_.magic.ml) + ( -> Tiny_httpd_mime_.dummy.ml)) (select Tiny_httpd_log.ml from (logs logs.fmt fmt.tty -> Tiny_httpd_log.logs.ml) (-> Tiny_httpd_log.default.ml)))