Add to TestServer limitations: TestServer ignores stream positioning (#25896)
* Note TestServer ignores stream positioning * fixed xref link * fixed xref * typo fix * Reword a bit. * Update aspnetcore/test/middleware.md Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>pull/25917/head
parent
d2db9c7ad5
commit
f7d91db663
|
@ -5,7 +5,7 @@ description: Learn how to test ASP.NET Core middleware with TestServer.
|
|||
monikerRange: '>= aspnetcore-3.1'
|
||||
ms.author: riande
|
||||
ms.custom: mvc
|
||||
ms.date: 5/12/2020
|
||||
ms.date: 05/18/2022
|
||||
no-loc: [".NET MAUI", "Mac Catalyst", "Blazor Hybrid", Home, Privacy, Kestrel, appsettings.json, "ASP.NET Core Identity", cookie, Cookie, Blazor, "Blazor Server", "Blazor WebAssembly", "Identity", "Let's Encrypt", Razor, SignalR]
|
||||
uid: test/middleware
|
||||
---
|
||||
|
@ -116,7 +116,8 @@ TestServer:
|
|||
* Was created to replicate server behaviors to test middleware.
|
||||
* Does ***not*** try to replicate all <xref:System.Net.Http.HttpClient> behaviors.
|
||||
* Attempts to give the client access to as much control over the server as possible, and with as much visibility into what's happening on the server as possible. For example it may throw exceptions not normally thrown by `HttpClient` in order to directly communicate server state.
|
||||
* Doesn't set some transport specific headers by default as those are not usually relevant to middleware. For more information, see the next section.
|
||||
* Doesn't set some transport specific headers by default as those aren't usually relevant to middleware. For more information, see the next section.
|
||||
* Ignores the `Stream` position passed through <xref:System.Net.Http.StreamContent>. <xref:System.Net.Http.HttpClient> sends the entire stream from the start position, even when positioning is set. For more information, see [this GitHub issue](https://github.com/dotnet/aspnetcore/issues/33780).
|
||||
|
||||
### Content-Length and Transfer-Encoding headers
|
||||
|
||||
|
|
Loading…
Reference in New Issue