Skip to content

decompressor: add config flag to ignore no-transform#19399

Merged
rojkov merged 9 commits intoenvoyproxy:mainfrom
jpsim:lenient-no-transform
Jan 7, 2022
Merged

decompressor: add config flag to ignore no-transform#19399
rojkov merged 9 commits intoenvoyproxy:mainfrom
jpsim:lenient-no-transform

Conversation

@jpsim
Copy link
Copy Markdown
Contributor

@jpsim jpsim commented Jan 5, 2022

Commit Message: Add config flag to decompress even when no-transform is specified
Additional Description: This allows matching the more lenient behavior of other client-side networking libraries such as OkHttp or URLSession, especially in cases where the remote server is not under the client developer's control.
Risk Level: Low, defaults are unaffected, change is opt-in.
Testing: Added unit tests for existing no-transform behavior (there was none) and a new test validating the new configuration flag.
Docs Changes: Updated.
Release Notes: Added.
Platform Specific Features:

@repokitteh-read-only
Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #19399 was opened by jpsim.

see: more, trace.

@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @lizan
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #19399 was opened by jpsim.

see: more, trace.

jpsim added 4 commits January 5, 2022 11:31
This allows matching the more lenient behavior of other client-side
networking libraries such as OkHttp or URLSession, especially in cases
where the remote server is not under the client developer's control.

Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
@jpsim jpsim changed the title Add config flag to decompress even when no-transform is specified decompressor: add config flag to ignore no-transform Jan 5, 2022
Signed-off-by: JP Simard <jp@jpsim.com>
@jpsim jpsim marked this pull request as ready for review January 5, 2022 18:00
@jpsim jpsim requested review from dio and rojkov as code owners January 5, 2022 18:00
Copy link
Copy Markdown
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple nits, otherwise this lgtm!

jpsim added 3 commits January 5, 2022 13:57
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
snowp
snowp previously approved these changes Jan 5, 2022
Copy link
Copy Markdown
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rojkov wanna take a look as owner of this extension?

@snowp
Copy link
Copy Markdown
Contributor

snowp commented Jan 5, 2022

Also this needs @envoyproxy/api-shepherds approval

Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM API modulo nits.

Signed-off-by: JP Simard <jp@jpsim.com>
@jpsim
Copy link
Copy Markdown
Contributor Author

jpsim commented Jan 6, 2022

@snowp @htuch feedback has been addressed and CI appears to be happy.

Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm api

@repokitteh-read-only repokitteh-read-only bot removed the api label Jan 7, 2022
Copy link
Copy Markdown
Member

@rojkov rojkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@rojkov rojkov merged commit 2afb957 into envoyproxy:main Jan 7, 2022
@jpsim jpsim deleted the lenient-no-transform branch January 7, 2022 11:31
@jpsim
Copy link
Copy Markdown
Contributor Author

jpsim commented Jan 7, 2022

Thanks for the feedback everyone.

buildbreaker pushed a commit to envoyproxy/envoy-mobile that referenced this pull request Jan 7, 2022
Commit Message: Decompress even when `no-transform` is specified
Additional Description: This leverages the flag added in envoyproxy/envoy#19399 to always decompress responses, regardless of the presence of a `no-transform` cache control header, matching the more lenient behavior of other client-side networking libraries such as OkHttp or URLSession, especially in cases where the remote server is not under the client developer's control.
Risk Level: Low, responses that would previously fail to decode will now succeed when a compressed response comes with a `no-transform` cache control header.
Testing: Added unit tests in Envoy and manually confirmed in an Android app that gzipped responses with `no-transform` that previously failed now succeed.
Docs Changes: Not needed.
Release Notes: Added.
Platform Specific Features: This is configured to apply regardless of the platform, so both iOS & Android will get this new behavior.
joshperry pushed a commit to joshperry/envoy that referenced this pull request Feb 13, 2022
This allows matching the more lenient behavior of other client-side
networking libraries such as OkHttp or URLSession, especially in cases
where the remote server is not under the client developer's control.

Risk Level: Low, defaults are unaffected, change is opt-in.
Testing: Added unit tests for existing no-transform behavior (there was none) and a new test validating the new configuration flag.
Docs Changes: Updated.
Release Notes: Added.

Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: Josh Perry <josh.perry@mx.com>
jpsim added a commit that referenced this pull request Nov 29, 2022
Commit Message: Decompress even when `no-transform` is specified
Additional Description: This leverages the flag added in #19399 to always decompress responses, regardless of the presence of a `no-transform` cache control header, matching the more lenient behavior of other client-side networking libraries such as OkHttp or URLSession, especially in cases where the remote server is not under the client developer's control.
Risk Level: Low, responses that would previously fail to decode will now succeed when a compressed response comes with a `no-transform` cache control header.
Testing: Added unit tests in Envoy and manually confirmed in an Android app that gzipped responses with `no-transform` that previously failed now succeed.
Docs Changes: Not needed.
Release Notes: Added.
Platform Specific Features: This is configured to apply regardless of the platform, so both iOS & Android will get this new behavior.

Signed-off-by: JP Simard <jp@jpsim.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants