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

Add gzipDisabled at the ResponseDefinitionBuilder level #2481

Merged
merged 6 commits into from
Jan 16, 2024

Conversation

dkhozyainov
Copy link
Contributor

Greetings, please look at my PR for #2071

  • Recommended: Join WireMock Slack to get any help in #help-contributing or a project-specific channel like #wiremock-java
  • Recommended: If you participate in Hacktoberfest 2023, make sure you're signed up there and in the WireMock form
  • The PR request is well described and justified, including the body and the references
  • The PR title represents the desired changelog entry
  • The repository's code style is followed (see the contributing guide)
  • Test coverage that demonstrates that the change works as expected
  • For new features, there's necessary documentation in this pull request or in a subsequent PR to wiremock.org

@dkhozyainov dkhozyainov requested a review from a team as a code owner November 5, 2023 18:14
@tomakehurst
Copy link
Member

I'm not sure just setting the content encoding header is enough to actually disable gzip.

Would be good to see a test showing the the response is actually in plain text.

@dkhozyainov
Copy link
Contributor Author

dkhozyainov commented Jan 15, 2024

@tomakehurst Ok, thanks for you feedback. I tried to illustrate it in test wireMockServerWithStubForWithGzipDisabledTrue.
At the beginning I used stubFor for ordinary response, then i used stubFor with my disabled function.
As a result i saw follow logs:
image

If i not understood what you want to see, please can explain one more time

@tomakehurst
Copy link
Member

OK, from your screenshot it looks like just changing the header does actually affect the body encoding, which is a bit counterintuitive but if it works...

@dkhozyainov
Copy link
Contributor Author

@tomakehurst, Hi, I fixed comments, please review, when will you have free time

@tomakehurst tomakehurst merged commit 39d62f7 into wiremock:master Jan 16, 2024
7 checks passed
@tomakehurst
Copy link
Member

Thanks!

Please can open a documentation PR for this at https://github.com/wiremock/wiremock.org?

@dkhozyainov
Copy link
Contributor Author

dkhozyainov commented Jan 16, 2024

Thanks for quick review!
Ok, I'll do it.

@dkhozyainov
Copy link
Contributor Author

@tomakehurst Hi, I open documentation PR wiremock/wiremock.org#251

@dkhozyainov dkhozyainov deleted the #2071 branch February 2, 2024 18:08
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.

None yet

2 participants