Skip to content
This repository has been archived by the owner on Mar 19, 2019. It is now read-only.

HttpSysServer sends invalid response for HEAD requests #339

Closed
devatwork opened this issue Apr 5, 2017 · 1 comment
Closed

HttpSysServer sends invalid response for HEAD requests #339

devatwork opened this issue Apr 5, 2017 · 1 comment
Assignees
Milestone

Comments

@devatwork
Copy link

devatwork commented Apr 5, 2017

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.

@Tratcher Tratcher added the bug label Jun 5, 2017
@muratg muratg added this to the 2.0.0 milestone Jun 23, 2017
@muratg
Copy link

muratg commented Jun 23, 2017

Assigning to @Tratcher for investigation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants