From ce32d181d5a0e04739307bf642d56cdb54a502bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Sat, 13 Jan 2024 13:24:20 -0800 Subject: [PATCH] Change default Accept header --- internal/reader/fetcher/request_builder.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/reader/fetcher/request_builder.go b/internal/reader/fetcher/request_builder.go index efe31395..f5e00901 100644 --- a/internal/reader/fetcher/request_builder.go +++ b/internal/reader/fetcher/request_builder.go @@ -16,6 +16,7 @@ import ( const ( defaultHTTPClientTimeout = 20 defaultHTTPClientMaxBodySize = 15 * 1024 * 1024 + defaultAcceptHeader = "application/xml, application/atom+xml, application/rss+xml, application/rdf+xml, application/feed+json, text/html, */*;q=0.9" ) type RequestBuilder struct { @@ -154,7 +155,7 @@ func (r *RequestBuilder) ExecuteRequest(requestURL string) (*http.Response, erro } req.Header = r.headers - req.Header.Set("Accept", "*/*") + req.Header.Set("Accept", defaultAcceptHeader) req.Header.Set("Connection", "close") slog.Debug("Making outgoing request", slog.Group("request",