► |  | Web Server: PLT HTTP Server

1 | Running the Web Server
2 | Writing Servlets
3 | Extending the Web Server
4 | Troubleshooting and Tips
5 | Acknowledgements
| Index

► | 3 | Extending the Web Server

3.1 | Configuration
3.2 | Setting Up Servlets
3.3 | Dispatchers
3.4 | Web Config Unit
3.5 | Web Server Unit
3.6 | Internal

▼ | 3.6 | Internal

3.6.1 | Timers
3.6.2 | Connection Manager
3.6.3 | Dispatching Server
3.6.4 | Serializable Closures
3.6.5 | Cache Table
3.6.6 | MIME Types
3.6.7 | Serialization Utilities
3.6.8 | URL Param
3.6.9 | Miscellaneous Utilities

On this page:

read-mime-types
make-path->mime-type

Version: 4.1.4
top← prev up next →

##### 3.6.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-string?

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-string?

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

top← prev up next →