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

Accept transfer-encoding: chunked instead of content-length when getting MSI token #63

Open
thridevmanikanta opened this issue Nov 8, 2024 · 0 comments · May be fixed by #64
Open

Accept transfer-encoding: chunked instead of content-length when getting MSI token #63

thridevmanikanta opened this issue Nov 8, 2024 · 0 comments · May be fixed by #64

Comments

@thridevmanikanta
Copy link

When getting the MSI token in the AzureADAuthenticator class, the response gets chunked if the token size crosses more than 2048. This returns a header transfer-encoding: chunked instead of content-length. The code is written so that it only relies on content-length if available. This should be changed and transfer-encoding: chunked should also be accepted.

favoretti added a commit to favoretti/azure-data-lake-store-java that referenced this issue Nov 13, 2024
In some cases, token returned exceeds 2048 bytes and is returned as
chunked, in which case Content-length is set to 0.

`getInputStream()` handles chunked contents gracefully, but the check
for the Content-length to 0 breaks the use-case.

Also, if the HTTP ersponse code isn't 200, we want to log all of the
output instead of chopping it off at 1024 bytes.

Fixes Azure#63
@favoretti favoretti linked a pull request Nov 13, 2024 that will close this issue
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 a pull request may close this issue.

1 participant