Fix auto-headers for aiohttp (for real this time :))#7749
Merged
Conversation
Contributor
|
(message created by the CI based on PR content) Installation instructionPackage azure-coreYou can install the package You can build a wheel to distribute for test using the following command: If you have a local clone of this repository, you can also do:
Or build a wheel file to distribute for testing:
Direct downloadYour files can be directly downloaded here: |
xiangyan99
approved these changes
Oct 9, 2019
annatisch
approved these changes
Oct 9, 2019
bryevdv
approved these changes
Oct 9, 2019
xiangyan99
added a commit
that referenced
this pull request
Oct 10, 2019
* increment key vault version (#7704) * Update ep livetest according to storage-blob-b4 (#7725) * Bug fix #6690 (#7738) * Fix auto-headers for aiohttp (for real this time :)) (#7749) * Fix auto-headers for aiohttp * ChangeLog * [AutoPR frontdoor/resource-manager] some fixes for frontdoor readme (#7714) * Generated from e5fa469589e9cddf953d91122ebf61fc705ea8bb renamed aggregation intervals * Generated from 729f3420dad818c11e458aa67483039fd9b48778 Updated timeseriesType * Generated from 9630e7a1f4c4c443797f8efa12d20bf1cf7a4dee scorecard -> scoreboard * Generated from 3a7dbc786a7789ef058736e2dfa8be0f7ab5f53d network experiment resource state * Packaging update of azure-mgmt-frontdoor * changelog * Fix requests asyncio if input data is async gen (#7743) * Fix requests asyncio if input data is async gen * ChangeLog * Feedback * Update HISTORY.md * update user agent string (#7750) * remove get_pending_certificate_signing_request (#7560)
xiangyan99
added a commit
that referenced
this pull request
Oct 10, 2019
* move config into kwargs * use pop to avoid dup values for kw arguement 'config' * update doc * fix cosmos client * pylint fix * remove config * fix typo * Get latest master (#7770) * increment key vault version (#7704) * Update ep livetest according to storage-blob-b4 (#7725) * Bug fix #6690 (#7738) * Fix auto-headers for aiohttp (for real this time :)) (#7749) * Fix auto-headers for aiohttp * ChangeLog * [AutoPR frontdoor/resource-manager] some fixes for frontdoor readme (#7714) * Generated from e5fa469589e9cddf953d91122ebf61fc705ea8bb renamed aggregation intervals * Generated from 729f3420dad818c11e458aa67483039fd9b48778 Updated timeseriesType * Generated from 9630e7a1f4c4c443797f8efa12d20bf1cf7a4dee scorecard -> scoreboard * Generated from 3a7dbc786a7789ef058736e2dfa8be0f7ab5f53d network experiment resource state * Packaging update of azure-mgmt-frontdoor * changelog * Fix requests asyncio if input data is async gen (#7743) * Fix requests asyncio if input data is async gen * ChangeLog * Feedback * Update HISTORY.md * update user agent string (#7750) * remove get_pending_certificate_signing_request (#7560) * pylint fix * update history.md
fengzhou-msft
pushed a commit
that referenced
this pull request
Nov 5, 2019
* Fix auto-headers for aiohttp * ChangeLog
fengzhou-msft
pushed a commit
that referenced
this pull request
Nov 5, 2019
* move config into kwargs * use pop to avoid dup values for kw arguement 'config' * update doc * fix cosmos client * pylint fix * remove config * fix typo * Get latest master (#7770) * increment key vault version (#7704) * Update ep livetest according to storage-blob-b4 (#7725) * Bug fix #6690 (#7738) * Fix auto-headers for aiohttp (for real this time :)) (#7749) * Fix auto-headers for aiohttp * ChangeLog * [AutoPR frontdoor/resource-manager] some fixes for frontdoor readme (#7714) * Generated from e5fa469589e9cddf953d91122ebf61fc705ea8bb renamed aggregation intervals * Generated from 729f3420dad818c11e458aa67483039fd9b48778 Updated timeseriesType * Generated from 9630e7a1f4c4c443797f8efa12d20bf1cf7a4dee scorecard -> scoreboard * Generated from 3a7dbc786a7789ef058736e2dfa8be0f7ab5f53d network experiment resource state * Packaging update of azure-mgmt-frontdoor * changelog * Fix requests asyncio if input data is async gen (#7743) * Fix requests asyncio if input data is async gen * ChangeLog * Feedback * Update HISTORY.md * update user agent string (#7750) * remove get_pending_certificate_signing_request (#7560) * pylint fix * update history.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In some scenario, aiohttp is setting content-type for us. This might be something we don't want, for instance for Storage it was breaking the signature (Content-Type being part of the signature, the signature didn't match anymore). First attempt to fix was then to say to aiohttp "whatever scenario, don't do auto-headers": #6992
But this one broke the formdata tests: because when using "multipart/form-data" you really want aiohttp to do that for you (there is a boundary to generate, etc.).
So this PR is being more explicit: if we know for sure this request comes with no body: don't let aiohttp add automatically "Content-Type". I believe it's more accurate to what we wanted to fix anyway.
Side note @scbedd : if this issue #4773 was implemented, we would have caught that earlier :/. No blaming, just to give context for the value that would bring #4773