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

Update to support chunked transfer #96

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Conversation

sswguo
Copy link
Member

@sswguo sswguo commented Jul 19, 2024

Fix for MMENG-4165, there are issues with incomplete downloads and failures when using curl/wget on prod.

After checking, it's caused by that it response with chunked way but wrong format in body, this adds the support for that based on the doc: https://www.rfc-editor.org/rfc/rfc9112#field.transfer-encoding

I test it with wget and curl in both ubi7 & ubi8, works well and will test it on dev later.

@sswguo sswguo requested review from ligangty and ruhan1 July 19, 2024 03:15
@ruhan1
Copy link
Contributor

ruhan1 commented Jul 22, 2024

The 'writeExistingTransfer' downloads from main indy. Does indy get the headers from remote site then inherits the 'chunked'?

@sswguo
Copy link
Member Author

sswguo commented Jul 22, 2024

The 'writeExistingTransfer' downloads from main indy. Does indy get the headers from remote site then inherits the 'chunked'?

I checked to print the header from gateway or indy directly, seems there is transfer-encoding: chunked when it requests from gateway, and there is not that header when requesting indy directly.

But the generic proxy side (okhttp3.response) will always include that no matter pointing to gateway or indy.

Copy link
Contributor

@ruhan1 ruhan1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. LGTM

@sswguo sswguo merged commit 3cb9ea5 into Commonjava:main Jul 22, 2024
1 check passed
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.

2 participants