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

Fix error handling when token is chunked #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

favoretti
Copy link

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 #63

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
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.

Accept transfer-encoding: chunked instead of content-length when getting MSI token
1 participant