add space before the header value in getAllResponseHeaders #67
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request add a single space before header value (after colon). then the polyfilled
getAllResponseHeaders()
will return the same format value with nativeThe origin http header
Parsed response header
The return value of polyfilled getAllResponseHeaders()
The space lost here
The FIRST CHAR LOST.
Some 3rd libraries like azure-sdk-for-js makes http request by using
XMLHttpRequest
and parses header by itself just like following codehttps://github.com/Azure/azure-sdk-for-js/blob/744e51acb755db2c565c71a8856d8d13e6ec345b/sdk/core/core-https/src/xhrHttpsClient.ts#L129
If the return value from the polyfilled function XMLHttpRequest.getAllResponseHeaders() is not keeps the exact same format (
Date: Thu, 01 Oct 2020 05:18:27 GMT\r\n
) as the original value, some thing will broken.