diff --git a/README.md b/README.md index f6825ec..2f25adc 100644 --- a/README.md +++ b/README.md @@ -16,17 +16,7 @@ indir [--host address] [--port port] [--root http_root] directory --root http_root hosts on the specified subdirectory, i.e. `/files/` ``` -## customization - -### readme -drop a `README.md` into any directory and indir will render -it below the file listing with full markdown support! - ---- - ## to-do: - [x] use templates instead of hard-coded HTML (i was lazy) -- [x] directory header from readme file +- [ ] directory header from readme file - [ ] directory stylesheet overrides -- [x] index.html serving support -- [x] fix mime-types for browser file view \ No newline at end of file diff --git a/main.go b/main.go index d01ac12..890efa7 100755 --- a/main.go +++ b/main.go @@ -154,9 +154,7 @@ func main() { mimeType := "application/octet-stream" extPos := strings.LastIndex(info.Name(), ".") if extPos != -1 { - if m := mime.TypeByExtension(info.Name()[extPos:]); m != "" { - mimeType = m - } + mimeType = mime.TypeByExtension(info.Name()[:extPos]) } w.Header().Set("Content-Type", mimeType)