-
Notifications
You must be signed in to change notification settings - Fork 10.5k
fix dotnet#43523 HttpSys Content-Length and Transfer-Encoding conflicts #44144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for your PR, @FatTigerWang. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
This will need some unit tests. Also, this part of the original issue is missing:
|
Can you explain it specifically? Should I check the CL header in the constructor and remove it instead of removing it on the ContentLegnth's get accessor? |
|
The code you changed isn't run until someone accesses the Request.Body, right? You can test that in the debugger by setting a break point. That would allow an application to read the invalid Content-Length header text from the collection before your code runs to modify it. So we need to find a way to make that modification code run earlier, like calling it from the Request constructor. |
|
I will add unit tests later. |
|
I found this test to be invalid: |
|
I want to add a unit test here like this method, but it always gets skipped. |
Skipped? Note those tests are set up to run in several different projects and to skip if some of the dependencies aren't met. E.g. one project runs it for IIS, but only if installed and you're running as admin. The IIS Express test project should always run these on Windows. |
|
The unit tests were skipped because I didn't install ASP.NET Hosting bundle, and now the unit tests are working fine after the installation is complete. |
|
Thanks |
fix #43523 HttpSys Content-Length and Transfer-Encoding conflicts
Summary of the changes (Less than 80 chars)
Description
Fixes #43523 HttpSys Content-Length and Transfer-Encoding conflicts