Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KTOR-7830 HttpCache may cache response before its transformation #4519

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

osipxd
Copy link
Member

@osipxd osipxd commented Nov 29, 2024

Subsystem
Client

Motivation
KTOR-7830 Installing HttpCache before ContentEncoding prevents response body to be decoded

Solution
The problem is that both HttpCache and ContentEncoding use phase HttpReceivePipeline.State to handle responses, so installation order matters here. I've changed HttpCache plugin to operate in an additional phase after State phase, when all response transformations should be already applied.

@osipxd osipxd self-assigned this Nov 29, 2024
@osipxd osipxd force-pushed the osipxd/httpcache-after-transformations branch from b84377e to 44d78e9 Compare November 29, 2024 13:19
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.

1 participant