Remove useless function contenttype()
git-svn-id: file:///srv/svn/repo/marisa/trunk@21 d6811dac-2434-b64a-9ddc-f563ab233461
This commit is contained in:
parent
68a48d9b97
commit
aa47506298
13
partage.go
13
partage.go
@ -42,19 +42,6 @@ var conf struct {
|
||||
}
|
||||
|
||||
|
||||
func contenttype(f *os.File) string {
|
||||
buffer := make([]byte, 512)
|
||||
|
||||
_, err := f.Read(buffer)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
mime := http.DetectContentType(buffer)
|
||||
|
||||
return mime
|
||||
}
|
||||
|
||||
func writefile(f *os.File, s io.ReadCloser, contentlength int64) error {
|
||||
buffer := make([]byte, 4096)
|
||||
eof := false
|
||||
|
Loading…
x
Reference in New Issue
Block a user