-
Notifications
You must be signed in to change notification settings - Fork 2.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
[WIP] Implement proper payload chunked encoding in HTTP api_v3 #6479
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: chahatsagarmain <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6479 +/- ##
==========================================
- Coverage 96.23% 96.15% -0.09%
==========================================
Files 368 375 +7
Lines 20978 21433 +455
==========================================
+ Hits 20189 20608 +419
- Misses 604 629 +25
- Partials 185 196 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: chahatsagarmain <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
n, err := resp.Body.Read(buf) | ||
|
||
if n > 0 { | ||
fullResponse.Write(buf[:n]) |
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.
if you concatenate the chunks you will end up with invalid JSON
// Set chunked transfer encoding before any writes | ||
w.Header().Set("Transfer-Encoding", "chunked") | ||
w.Header().Set("Content-Encoding", "gzip") | ||
w.Header().Set("Vary", "Accept-Encoding") |
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.
what is this?
} | ||
|
||
// Set chunked transfer encoding before any writes | ||
w.Header().Set("Transfer-Encoding", "chunked") |
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.
chunked encoding requires each chunk to be prefixed with its size
Which problem is this PR solving?
Description of the changes
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test