From bb8acd750c8861bf1d8c334f4212ad7448076203 Mon Sep 17 00:00:00 2001 From: Sinuhe Tellez Date: Sat, 9 Mar 2019 22:49:00 -0500 Subject: [PATCH] Fixing typos --- CHANGELOG.md | 2 ++ main.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89107e2..e6eca0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Changed serveFeedauthor parameter for author. - Adding host parameter. - Start using go modules. +- Fixing typo in file extension gif +- The memetype for FB2 changed to text/fb2+xml ### Removed - vendor folder. diff --git a/main.go b/main.go index 62f33bd..86c50f4 100644 --- a/main.go +++ b/main.go @@ -56,7 +56,7 @@ type acquisitionFeed struct { func init() { mime.AddExtensionType(".mobi", "application/x-mobipocket-ebook") mime.AddExtensionType(".epub", "application/epub+zip") - mime.AddExtensionType(".fb2", "txt/xml") + mime.AddExtensionType(".fb2", "text/fb2+xml") } func main() { @@ -142,7 +142,7 @@ func getRel(name string, acquisition bool) (rel string) { return } ext := filepath.Ext(name) - if rel = "http://opds-spec.org/acquisition"; ext == ".png" || ext == ".jpg" || ext == ".jpeg" || ext == ".gift" { + if rel = "http://opds-spec.org/acquisition"; ext == ".png" || ext == ".jpg" || ext == ".jpeg" || ext == ".gif" { rel = "http://opds-spec.org/image/thumbnail" } return