Overview
| Comment: | Serve index.html files correctly. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
87b77ab4de07524cbd4ee291570b7b46 |
| User & Date: | marka on 2025-08-15 07:04:49.792 |
| Other Links: | manifest | tags |
Context
|
2025-08-15
| ||
| 13:44 | Use Crystal MIME library for determining content-type. check-in: e81f9f06dd user: marka tags: trunk | |
| 07:04 | Serve index.html files correctly. check-in: 87b77ab4de user: marka tags: trunk | |
| 02:26 | First checkin. check-in: 0ec0ee863c user: marka tags: trunk | |
Changes
Modified src/fs.cr
from [ce44d3a1f8]
to [ff1867bb3f].
| ︙ | |||
87 88 89 90 91 92 93 94 95 96 97 98 99 100 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | + - - + + - + + + - - - + + + + + + + |
end
# Simple HTTP server for static files.
class Server
def initialize(config : Config)
@config = config
@root = config.root
@server = uninitialized HTTP::Server
end
def process_request(context : HTTP::Server::Context)
request = context.request
request_path = request.path
method = request.method
|
| ︙ |