gotosocial/internal/web
Daenney e91cabb704
[bugfix] Fix NegotiateFormat with multiple accept headers (#1797)
* [bugfix] Fix NegotiateAccept with multi accept

There's a bug in Gin's NegotiateFormat that doesn't handle the presence
of multilpe accept headers. This lifts the code from the PR @tsmethurst
sent a year ago to Gin into our codebase to fix the issue.

* [bugfix] Concat accept header in webfinger

Some implementations bug out when there's multiple accept headers,
including Gin (see 7050112af1). But things
seem to work reliably with a single accept header with multiple parts.

Fixes: #1793
2023-05-16 15:08:45 +02:00
..
about.go [chore] Prefer JSON errors in API endpoints (#1766) 2023-05-12 10:16:41 +02:00
assets.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
base.go [chore] Prefer JSON errors in API endpoints (#1766) 2023-05-12 10:16:41 +02:00
confirmemail.go [chore] Prefer JSON errors in API endpoints (#1766) 2023-05-12 10:16:41 +02:00
customcss.go [chore] Prefer JSON errors in API endpoints (#1766) 2023-05-12 10:16:41 +02:00
domain-blocklist.go [chore] Prefer JSON errors in API endpoints (#1766) 2023-05-12 10:16:41 +02:00
etag.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
opengraph.go [bugfix] Fix invalid og:description on account w/ empty note (#1733) 2023-05-03 16:18:34 +02:00
opengraph_test.go [bugfix] Fix invalid og:description on account w/ empty note (#1733) 2023-05-03 16:18:34 +02:00
profile.go [bugfix] Fix NegotiateFormat with multiple accept headers (#1797) 2023-05-16 15:08:45 +02:00
robots.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
rss.go [chore] Prefer JSON errors in API endpoints (#1766) 2023-05-12 10:16:41 +02:00
settings-panel.go [chore] Prefer JSON errors in API endpoints (#1766) 2023-05-12 10:16:41 +02:00
thread.go [bugfix] Fix NegotiateFormat with multiple accept headers (#1797) 2023-05-16 15:08:45 +02:00
web.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00