This repository was archived by the owner on Mar 19, 2019. It is now read-only.
This repository was archived by the owner on Mar 19, 2019. It is now read-only.
HttpSysServer sends invalid response for HEAD requests #339
Closed
Description
RFC 2626 and RFC 2731 states that a head request MUST NOT return a response body. See also the last paragraph of https://tools.ietf.org/html/rfc2616#section-4.3.
The following HTTP request/response pair is captured using Fiddler and returned by a simple web app running on HttpSysServer:
Request:
HEAD http://test.com:5000/ HTTP/1.1
Connection: Keep-Alive
Accept-Encoding: gzip, deflate
Host: test.com:5000
Response:
HTTP/1.1 302 Found
Transfer-Encoding: chunked
Location: /redirect.html
Server: Microsoft-HTTPAPI/2.0
Date: Thu, 30 Mar 2017 07:45:19 GMT
0
Repro repo: https://github.com/devatwork/ReproduceUnrecognizedResponse
Is you change the repro WebApp to .UseKestrel()
instead of .UseWebListener()
, both client applications run fine. This is why I think this issue is caused by an issue in HttpSysServer.
See https://github.com/dotnet/corefx/issues/14897 for more details on what uncovered this issue.