This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Support gzip encoding for request and response #301
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
otrosien
force-pushed
the
gzip
branch
2 times, most recently
from
March 10, 2022 17:03
3364965
to
ce065fe
Compare
otrosien
changed the title
Support gzip encoding in fahrschein-http-simple
Support gzip encoding for request and response by default
Mar 14, 2022
otrosien
force-pushed
the
gzip
branch
2 times, most recently
from
March 18, 2022 10:43
910b80d
to
2de7ea9
Compare
Support gzip compression for publishing Add references to spring documentation, code fix deletes an unrelated change revert draining (to avoid mixing of concerns) Adds API docs to RequestFactory interface
adds readme paragraph on compression
otrosien
force-pushed
the
gzip
branch
2 times, most recently
from
March 18, 2022 12:21
d1c0ee0
to
733bccd
Compare
For requests without body we mustn't set content-encoding headers. This fixes this bug, caught be end-to-end tests.
MALPI
reviewed
Mar 21, 2022
...hein-http-apache/src/main/java/org/zalando/fahrschein/http/apache/HttpComponentsRequest.java
Outdated
Show resolved
Hide resolved
...pache/src/test/java/org/zalando/fahrschein/http/apache/HttpComponentsRequestFactoryTest.java
Outdated
Show resolved
Hide resolved
MALPI
reviewed
Mar 21, 2022
...hein-http-apache/src/main/java/org/zalando/fahrschein/http/apache/HttpComponentsRequest.java
Outdated
Show resolved
Hide resolved
* Removed x-flow-id from log4j2.xml * Explicit imports * test-scope for fahrschein-e2e-test dependencies
otrosien
changed the title
Support gzip encoding for request and response by default
Support gzip encoding for request and response
Mar 22, 2022
otrosien
commented
Mar 23, 2022
public class ApacheNakadiClientTest extends AbstractRequestFactoryTest { | ||
|
||
@Override | ||
protected RequestFactory getRequestFactory() { | ||
final RequestConfig requestConfig = RequestConfig.custom() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I simplified the setup of Spring and Apache request factories for the tests, it's not necessarily giving us any benefit.
👍 |
1 similar comment
👍 |
* Wait for 3minutes for docker-compose to start up. In Github it seems to take quite long sometimes * Don't start nakadi-ui * Fix the description of automatically enabling compression in README
👍 |
1 similar comment
👍 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds transparent gzip support for consuming and publishing events from Nakadi.
For gzip-encoding of server responses, the clients are sending
Accept-Encoding
headers and are transparently handling this within the http-client libraries. For HTTP-POST compression, there is no pre-negotiation within HTTP, so need to rely on Nakadi supportinggzip
compression, and passContent-Encoding
header alongside with gzipped POST body. On the respectiveRequetFactory
enabling or disabling content-encoding is a mandatory choice, and this makes setting the RequestFactory a mandatory choice when building the NakadiClient as well.Closes #297
TODO: