Revert "Content-Length header not always returned when enumerating HttpContentHeaders"#102986
Revert "Content-Length header not always returned when enumerating HttpContentHeaders"#102986
Conversation
…tpConten…" This reverts commit d9d0e38.
|
/azp run runtime-libraries-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Tagging subscribers to this area: @dotnet/ncl |
|
@pedrobsaila we decided to revert the change as-is due to concerns of breaking existing code that may be relying on the header not being present. var content = new StringContent("Foo");
content.Headers.Add("Content-Length", "3"); // Throws because the value already existsBecause #16162 mainly impacts diagnostics scenarios (e.g. dumping the current request to the console via |
|
Failures unrelated, the originally failing tests are not failing anymore. |
|
/ba-g failures unrelated |
|
@MihaZupan I strongly disagree that this is only issue for diagnostics. Due to this bug, when I forward HTTP requests on the edge location in our project between our IoT Devices I have to make this: |
|
More discussion about this is on #16162 |
Reverts #102416
The change broke outerloop tests in

System.Net.Tests.SyncWebClientTest. Seems like it sends bogus Content-Length:cc @pedrobsaila @MihaZupan