1 Running the Web Server
2 Scheme Servlets
3 Web Language Servlets
4 Configuration
5 Dispatchers
6 Web Config Unit
7 Web Server Unit
8 Continuation Managers
9 Internal
10 Troubleshooting
11 Acknowledgements
Index
On this page:
read-mime-types
make-path->mime-type
Version: 4.0.2

 

9.6 MIME Types

 (require web-server/private/mime-types)

"private/mime-types.ss" provides function for dealing with "mime.types" files.

(read-mime-types p)  (hash-table/c symbol? bytes?)

  p : path?

Reads the "mime.types" file from p and constructs a hash table mapping extensions to MIME types.

(make-path->mime-type p)  (path? . -> . bytes?)

  p : path?

Uses a read-mime-types with p and constructs a function from paths to their MIME type.