summaryrefslogtreecommitdiff
path: root/internal/api/util/mime.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-11-27 14:00:57 +0000
committerLibravatar GitHub <noreply@github.com>2023-11-27 14:00:57 +0000
commit74700cc8034980334e7df466f313287a41d2b8a6 (patch)
tree63ab8912c813eefba8a492e0d0489f4e5fe59446 /internal/api/util/mime.go
parent[chore]: Bump codeberg.org/gruf/go-mutexes from 1.3.0 to 1.3.1 (#2387) (diff)
downloadgotosocial-74700cc8034980334e7df466f313287a41d2b8a6.tar.xz
[performance] http response encoding / writing improvements (#2374)
Diffstat (limited to 'internal/api/util/mime.go')
-rw-r--r--internal/api/util/mime.go28
1 files changed, 13 insertions, 15 deletions
diff --git a/internal/api/util/mime.go b/internal/api/util/mime.go
index edd0dcecf..ad1b405cd 100644
--- a/internal/api/util/mime.go
+++ b/internal/api/util/mime.go
@@ -17,20 +17,18 @@
package util
-// MIME represents a mime-type.
-type MIME string
-
const (
- AppJSON MIME = `application/json`
- AppXML MIME = `application/xml`
- AppXMLXRD MIME = `application/xrd+xml`
- AppRSSXML MIME = `application/rss+xml`
- AppActivityJSON MIME = `application/activity+json`
- AppActivityLDJSON MIME = `application/ld+json; profile="https://www.w3.org/ns/activitystreams"`
- AppJRDJSON MIME = `application/jrd+json` // https://www.rfc-editor.org/rfc/rfc7033#section-10.2
- AppForm MIME = `application/x-www-form-urlencoded`
- MultipartForm MIME = `multipart/form-data`
- TextXML MIME = `text/xml`
- TextHTML MIME = `text/html`
- TextCSS MIME = `text/css`
+ // Possible GoToSocial mimetypes.
+ AppJSON = `application/json`
+ AppXML = `application/xml`
+ AppXMLXRD = `application/xrd+xml`
+ AppRSSXML = `application/rss+xml`
+ AppActivityJSON = `application/activity+json`
+ AppActivityLDJSON = `application/ld+json; profile="https://www.w3.org/ns/activitystreams"`
+ AppJRDJSON = `application/jrd+json` // https://www.rfc-editor.org/rfc/rfc7033#section-10.2
+ AppForm = `application/x-www-form-urlencoded`
+ MultipartForm = `multipart/form-data`
+ TextXML = `text/xml`
+ TextHTML = `text/html`
+ TextCSS = `text/css`
)