diff --git a/backend/app/rest/api/rest.go b/backend/app/rest/api/rest.go index 47ba1f8d..b5e1c307 100644 --- a/backend/app/rest/api/rest.go +++ b/backend/app/rest/api/rest.go @@ -161,8 +161,8 @@ func (s *Rest) makeHTTPServer(port int, router http.Handler) *http.Server { Addr: fmt.Sprintf(":%d", port), Handler: router, ReadHeaderTimeout: 5 * time.Second, - WriteTimeout: 120 * time.Second, // TODO: such a long timeout needed for blocking export (backup) request - IdleTimeout: 30 * time.Second, + // WriteTimeout: 120 * time.Second, // TODO: such a long timeout needed for blocking export (backup) request + IdleTimeout: 30 * time.Second, } } diff --git a/backend/app/rest/api/rest_public_test.go b/backend/app/rest/api/rest_public_test.go index c62b62f5..3526b0d6 100644 --- a/backend/app/rest/api/rest_public_test.go +++ b/backend/app/rest/api/rest_public_test.go @@ -738,6 +738,7 @@ func TestRest_LastCommentsStream(t *testing.T) { wg.Wait() t.Logf("headers: %+v", r.Header) assert.Equal(t, "text/event-stream", r.Header.Get("content-type")) + assert.Equal(t, "keep-alive", r.Header.Get("connection")) recs := strings.Split(strings.TrimSuffix(string(body), "\n"), "\n") require.Equal(t, 9*3, len(recs), "9 events")