From 80d774a8ef3e21a73f75fc9ea8c337ed55ae5a77 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Sat, 7 Oct 2023 12:53:54 +0300 Subject: [PATCH] [#3461] removed content-type charset and deprecated keep-alive header field --- CHANGELOG.md | 3 +++ apis/realtime.go | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c803d406..74912e30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ - Speed up the listing loading times for records with large `editor` field values by initially fetching only a partial of the records data (the complete record data is loaded on record preview/update). - Added "Media library" (collection images picker) support for the TinyMCE `editor` field. +- Removed the explicit charset from the realtime response due to compatability issues with IIS ([#3461](https://github.com/pocketbase/pocketbase/issues/3461)). + _The `Connection:keep-alive` realtime response header was also removed as it is not really used with HTTP2 anyway._ + ## v0.18.9 diff --git a/apis/realtime.go b/apis/realtime.go index 9825a9c8..9d232a22 100644 --- a/apis/realtime.go +++ b/apis/realtime.go @@ -56,9 +56,8 @@ func (api *realtimeApi) connect(c echo.Context) error { api.app.SubscriptionsBroker().Unregister(client.Id()) }() - c.Response().Header().Set("Content-Type", "text/event-stream; charset=UTF-8") + c.Response().Header().Set("Content-Type", "text/event-stream") c.Response().Header().Set("Cache-Control", "no-store") - c.Response().Header().Set("Connection", "keep-alive") // https://github.com/pocketbase/pocketbase/discussions/480#discussioncomment-3657640 // https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering c.Response().Header().Set("X-Accel-Buffering", "no")