Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1da23ba07b | ||
|
|
cbfbeb6c22 | ||
|
|
c3418fdfed | ||
|
|
6181751e8d | ||
|
|
48c67bcead |
8
fs.go
8
fs.go
@@ -1,3 +1,5 @@
|
||||
// +build go1.16
|
||||
|
||||
package gemini
|
||||
|
||||
import (
|
||||
@@ -13,12 +15,6 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Add Gemini mime types
|
||||
mime.AddExtensionType(".gmi", "text/gemini")
|
||||
mime.AddExtensionType(".gemini", "text/gemini")
|
||||
}
|
||||
|
||||
// FileServer returns a handler that serves Gemini requests with the contents
|
||||
// of the provided file system.
|
||||
//
|
||||
|
||||
@@ -2,8 +2,15 @@ package gemini
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"mime"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Add Gemini mime types
|
||||
mime.AddExtensionType(".gmi", "text/gemini")
|
||||
mime.AddExtensionType(".gemini", "text/gemini")
|
||||
}
|
||||
|
||||
var crlf = []byte("\r\n")
|
||||
|
||||
// Errors.
|
||||
|
||||
Reference in New Issue
Block a user