Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Added accept-encoding #1026

Merged
2 commits merged into from
Jun 2, 2022
Merged

Added accept-encoding #1026

2 commits merged into from
Jun 2, 2022

Conversation

ghost
Copy link

@ghost ghost commented Jun 1, 2022

Issue 番号 / Issue ID

目的 / Purpose

  • list.jsonダウンロード時に圧縮がされるようにする

変更内容 / Changes

  • list.jsonダウンロード時のリクエストヘッダにAccept-Encoding: gzip, deflateを追加
    • Androidだとヘッダを直接追加できないため、Handlerを指定しAutomaticDecompressionを指定する。iOSも同様の実装で問題なし。(動作は同じ)
    • .NET Standard 2.1(DecompressionMethods)を使用しているため、Brotliは対応していない。
    • 適当なダミーのサーバでヘッダが期待通り指定されていることも確認済み('accept-encoding': 'gzip, deflate'

破壊的変更をもたらしますか / Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request の種類 / Pull Request type

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

確認事項 / What to check

  • [ ]

その他 / Other information


Internal IDs:

  • NFR 7346

@ghost ghost requested review from a user, cocoa-dev003 and cocoa-dev009 June 1, 2022 07:40
@ghost ghost self-assigned this Jun 1, 2022
@ghost ghost marked this pull request as draft June 1, 2022 07:55
@ghost
Copy link
Author

ghost commented Jun 1, 2022

ヘッダ追加のみで処理は流れていますが、Issueの情報によるとAndroidはDecompressの対応が必要なようなので期待通り圧縮が効いていない可能性があるのでもう少し動きを詳しく見ます。

@ghost ghost force-pushed the feature/accept-encoding branch from 1372757 to bf217af Compare June 2, 2022 01:43
@ghost
Copy link
Author

ghost commented Jun 2, 2022

期待通り圧縮が効いていない可能性があるのでもう少し動きを詳しく見ます。

やはりAndroidでは期待通り動いていなかったので、修正しました。
Android: Accept-Encodingヘッダを直接追加できない
iOS: Accept-Encodingヘッダを直接追加できる

AutomaticDecompressionで指定するように修正しました。

@ghost ghost marked this pull request as ready for review June 2, 2022 02:03
@sonarcloud
Copy link

sonarcloud bot commented Jun 2, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

57.1% 57.1% Coverage
0.0% 0.0% Duplication

@ghost ghost merged commit c6bd611 into develop Jun 2, 2022
@ghost ghost deleted the feature/accept-encoding branch June 2, 2022 02:52
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

診断キー一覧ファイル( list.json )の圧縮転送対応提案
1 participant