You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using gzip compression in the client leads to accumulating the addition of the same header content-encoding: gzip to each api call.
As a result of this after a lot of calls, you will get 494 errors from Algolia API on each call.
#755)
…ing a new one
| Q | A
| ----------------- | ----------
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Related Issue | Fix#742 [CR-5655]
| Need Doc update | no
## Describe your change
Replace the `.Add()` method on the headers variable by the `.Set()`
method to avoid piling up the same header.
## What problem is this fixing?
As stated by some user, the current transporter in Go adds a header each
time a request is sent with compression enabled.
Using the `.Set()` method instead fixes the issue.
[CR-5655]:
https://algolia.atlassian.net/browse/CR-5655?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Description
Using gzip compression in the client leads to accumulating the addition of the same header
content-encoding: gzip
to each api call.As a result of this after a lot of calls, you will get 494 errors from Algolia API on each call.
Output from Algolia search API Logs:
Host: xxxxxxxxxxx.algolia.net
User-Agent: Algolia for Go (3.31.0);Go (go1.21.1)
Transfer-Encoding: chunked
Connection: Keep-Alive
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: gzip
Content-Encoding: ...
Steps To Reproduce
The text was updated successfully, but these errors were encountered: