The Wayback Machine - https://web.archive.org/web/20211026040601/https://github.com/dotnet/aspnetcore/issues/37831
Skip to content
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

IIS Express Claims to support trailers on Win10 #37831

Open
Tratcher opened this issue Oct 25, 2021 · 0 comments
Open

IIS Express Claims to support trailers on Win10 #37831

Tratcher opened this issue Oct 25, 2021 · 0 comments

Comments

@Tratcher
Copy link
Contributor

@Tratcher Tratcher commented Oct 25, 2021

IIS in-proc does feature detection based on IIS APIs. However, the APIs for Reset and Trailers were ported to IIS Express which does not support trailers when run on Win10. This causes our feature detection code in the app layer to wrongfully indicate trailers are supported. The response fails (I'm having trouble tracking down the actual error).

    context.Response.ContentType = "text/plain";
    await context.Response.WriteAsync("Hello World!");
    if (context.Response.SupportsTrailers())
    {
        context.Response.AppendTrailer("MyTrailer", "MyTrailerValue");
    }

internal IHttpResponseTrailersFeature? GetResponseTrailersFeature()
{
// Check version is above 2.
if (HttpVersion >= System.Net.HttpVersion.Version20 && NativeMethods.HttpHasResponse4(_requestNativeHandle))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant