-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve MultipartWriter parts headers on write (#3475)
* Preserve MultipartWriter parts headers on write This fixes #3035 * Mark case when payload has no headers as unreachable with FIXME This case is actually impossible because all the payload instances will have headers defined with at least `Content-Type` definition. While, it's theoretically possible to create `Payload` without headers definition and Multipart format itself allows such parts, in multipart module we already have set of assertions which wouldn't make this possible. Since `_binary_headers` is private property with unknown fate and created just to not copy-paste headers serialization logic twice and used exactly within `multipart` module, we're safe to ignore this branch. Proper fix would be refactoring the way how headers and their fragments will get handled by `Payload` instances, but this quite a work out of scope of current bugfix and will be addressed in upcoming PR.
- Loading branch information
Showing
4 changed files
with
35 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Preserve MultipartWriter parts headers on write. |
This file contains 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
This file contains 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
This file contains 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