-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Push: add deflate compression in post requests #5249
Push: add deflate compression in post requests #5249
Conversation
|
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.
LGTM. I found some duplicate tests which I think should be removed.
{ | ||
path: `/loki/api/v1/push`, | ||
body: deflateString(`{"streams": [{ "stream": { "foo": "bar2" }, "values": [ [ "1570818238000000000", "fizzbuzz" ] ] }]}`), | ||
contentType: `application/jsonn; charset=utf-8`, | ||
contentEncoding: `deflate`, | ||
valid: false, | ||
}, | ||
{ | ||
path: `/loki/api/v1/push`, | ||
body: deflateString(`{"streams": [{ "stream": { "foo4": "bar2" }, "values": [ [ "1570818238000000000", "fizzbuzz" ] ] }]}`), | ||
contentType: `application/json; charsetutf-8`, | ||
contentEncoding: `deflate`, | ||
valid: false, | ||
}, |
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.
These two tests seem to be already added above. Let us remove the duplicate tests.
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.
ok
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.
LGTM, thanks @3JIou-home!
@3JIou-home could you sign the cla? |
yap |
What this PR does / why we need it:
HTTP server recognize
Content-Encoding: deflate
request header and unpack request body.