dart-sdk/sdk
Zichang Guo 242ce279db [dart:io] Fix Content-Length header being accidentally dropped
If the Content-Length has been set by contentLength setter, manually
setting the header to the same value will lead to the header being
dropped, since _contentLength is not updated in set() method. The method
set() will erase the header and add back the header with new value. As
_contentLength is not updated, when it adds back the new header, it
looks at _contentLength (Which is not reset) and skips the addition (
_contentLength is the same as the new value, we had the header already).

Bug: https://github.com/dart-lang/sdk/issues/42369
Change-Id: I3fba7cc332bdff0ba56e602ac810fbaeb85d2606
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151427
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-06-19 20:42:07 +00:00
..
bin [Core Libraries] Eliminate the fork in the core libraries. 2020-06-16 23:37:36 +00:00
lib [dart:io] Fix Content-Length header being accidentally dropped 2020-06-19 20:42:07 +00:00
api_readme.md Update the API docs readme 2020-01-16 21:23:09 +00:00
BUILD.gn [vm/ffi] Expose a subset of dart_(native_)api.h for dynamic linking. 2020-06-18 07:30:43 +00:00