dotnet / dotnet/dotnet-api-docs
Misleading documentation about `Close` and `Abort`
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
The remarks for this class discuss Close and Abort as if they are operations that can be performed directly on the `HttpListenerContext`, but these are methods are instead declared on `HttpListenerResponse`.
It *appears* that the caller of `HttpListener.GetContext` (or one of its asynchronous variants) is responsible for calling one of `Dispose`/`Close`/`Abort` on the `Response` in order to ensure that system resources are freed appropriately, but this is not terribly clear from the documentation.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 8d6db24e-a10b-c55c-e89c-0eb00da2b7dc
* Version Independent ID: fdb8413a-18d4-fdc2-85a7-322eb720f348
* Content: [HttpListenerContext Class (System.Net)](https://docs.microsoft.com/en-us/dotnet/api/system.net.httplistenercontext?view=netframework-4.7.2#feedback)
* Content Source: [xml/System.Net/HttpListenerContext.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Net/HttpListenerContext.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**
Contributor guide
Assessment
This issue has not been assessed yet.