-
Notifications
You must be signed in to change notification settings - Fork 351
Merge tag 'v3.2.8' into 'main' #319
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
Changes from all commits
ffbf707
bc83a3a
c55dd95
8c4e5b5
d1df0c8
664af54
ef4296e
20c076c
362b7be
005f94e
2a5ff32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -223,7 +223,7 @@ private static async Task<HttpRequestMessage> ReadAsHttpRequestMessageAsyncCore( | |
|
||
HttpUnsortedRequest httpRequest = new HttpUnsortedRequest(); | ||
HttpRequestHeaderParser parser = new HttpRequestHeaderParser(httpRequest, | ||
HttpRequestHeaderParser.DefaultMaxRequestLineSize, maxHeaderSize); | ||
Math.Max(HttpRequestHeaderParser.DefaultMaxRequestLineSize, maxHeaderSize), maxHeaderSize); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the fix for #307 |
||
ParserState parseStatus; | ||
|
||
byte[] buffer = new byte[bufferSize]; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ namespace System.Net.Http | |
{ | ||
/// <summary> | ||
/// Provides an <see cref="HttpContent"/> implementation that exposes an output <see cref="Stream"/> | ||
/// which can be written to directly. The ability to push data to the output stream differs from the | ||
/// which can be written to directly. The ability to push data to the output stream differs from the | ||
/// <see cref="StreamContent"/> where data is pulled and not pushed. | ||
/// </summary> | ||
public class PushStreamContent : HttpContent | ||
|
@@ -24,8 +24,8 @@ public class PushStreamContent : HttpContent | |
/// <summary> | ||
/// Initializes a new instance of the <see cref="PushStreamContent"/> class. The | ||
/// <paramref name="onStreamAvailable"/> action is called when an output stream | ||
/// has become available allowing the action to write to it directly. When the | ||
/// stream is closed, it will signal to the content that is has completed and the | ||
/// has become available allowing the action to write to it directly. When the | ||
/// stream is closed, it will signal to the content that it has completed and the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doc comment updates in this |
||
/// HTTP request or response will be completed. | ||
/// </summary> | ||
/// <param name="onStreamAvailable">The action to call when an output stream is available.</param> | ||
|
@@ -35,10 +35,11 @@ public PushStreamContent(Action<Stream, HttpContent, TransportContext> onStreamA | |
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="PushStreamContent"/> class. | ||
/// Initializes a new instance of the <see cref="PushStreamContent"/> class. | ||
/// </summary> | ||
/// <param name="onStreamAvailable">The action to call when an output stream is available. The stream is automatically | ||
/// closed when the return task is completed.</param> | ||
/// <param name="onStreamAvailable">The action to call when an output stream is available. When the | ||
/// output stream is closed or disposed, it will signal to the content that it has completed and the | ||
/// HTTP request or response will be completed.</param> | ||
public PushStreamContent(Func<Stream, HttpContent, TransportContext, Task> onStreamAvailable) | ||
: this(onStreamAvailable, (MediaTypeHeaderValue)null) | ||
{ | ||
|
@@ -47,6 +48,8 @@ public PushStreamContent(Func<Stream, HttpContent, TransportContext, Task> onStr | |
/// <summary> | ||
/// Initializes a new instance of the <see cref="PushStreamContent"/> class with the given media type. | ||
/// </summary> | ||
/// <param name="onStreamAvailable">The action to call when an output stream is available.</param> | ||
/// <param name="mediaType">The value of the Content-Type content header on an HTTP response.</param> | ||
public PushStreamContent(Action<Stream, HttpContent, TransportContext> onStreamAvailable, string mediaType) | ||
: this(Taskify(onStreamAvailable), new MediaTypeHeaderValue(mediaType)) | ||
{ | ||
|
@@ -55,6 +58,10 @@ public PushStreamContent(Action<Stream, HttpContent, TransportContext> onStreamA | |
/// <summary> | ||
/// Initializes a new instance of the <see cref="PushStreamContent"/> class with the given media type. | ||
/// </summary> | ||
/// <param name="onStreamAvailable">The action to call when an output stream is available. When the | ||
/// output stream is closed or disposed, it will signal to the content that it has completed and the | ||
/// HTTP request or response will be completed.</param> | ||
/// <param name="mediaType">The value of the Content-Type content header on an HTTP response.</param> | ||
public PushStreamContent(Func<Stream, HttpContent, TransportContext, Task> onStreamAvailable, string mediaType) | ||
: this(onStreamAvailable, new MediaTypeHeaderValue(mediaType)) | ||
{ | ||
|
@@ -63,6 +70,8 @@ public PushStreamContent(Func<Stream, HttpContent, TransportContext, Task> onStr | |
/// <summary> | ||
/// Initializes a new instance of the <see cref="PushStreamContent"/> class with the given <see cref="MediaTypeHeaderValue"/>. | ||
/// </summary> | ||
/// <param name="onStreamAvailable">The action to call when an output stream is available.</param> | ||
/// <param name="mediaType">The value of the Content-Type content header on an HTTP response.</param> | ||
public PushStreamContent(Action<Stream, HttpContent, TransportContext> onStreamAvailable, MediaTypeHeaderValue mediaType) | ||
: this(Taskify(onStreamAvailable), mediaType) | ||
{ | ||
|
@@ -71,6 +80,10 @@ public PushStreamContent(Action<Stream, HttpContent, TransportContext> onStreamA | |
/// <summary> | ||
/// Initializes a new instance of the <see cref="PushStreamContent"/> class with the given <see cref="MediaTypeHeaderValue"/>. | ||
/// </summary> | ||
/// <param name="onStreamAvailable">The action to call when an output stream is available. When the | ||
/// output stream is closed or disposed, it will signal to the content that it has completed and the | ||
/// HTTP request or response will be completed.</param> | ||
/// <param name="mediaType">The value of the Content-Type content header on an HTTP response.</param> | ||
public PushStreamContent(Func<Stream, HttpContent, TransportContext, Task> onStreamAvailable, MediaTypeHeaderValue mediaType) | ||
{ | ||
if (onStreamAvailable == null) | ||
|
@@ -98,8 +111,8 @@ private static Func<Stream, HttpContent, TransportContext, Task> Taskify( | |
} | ||
|
||
/// <summary> | ||
/// When this method is called, it calls the action provided in the constructor with the output | ||
/// stream to write to. Once the action has completed its work it closes the stream which will | ||
/// When this method is called, it calls the action provided in the constructor with the output | ||
/// stream to write to. Once the action has completed its work it closes the stream which will | ||
/// close this content instance and complete the HTTP request or response. | ||
/// </summary> | ||
/// <param name="stream">The <see cref="Stream"/> to which to write.</param> | ||
|
@@ -142,8 +155,8 @@ public CompleteTaskOnCloseStream(Stream innerStream, TaskCompletionSource<bool> | |
|
||
#if NETFX_CORE | ||
[SuppressMessage( | ||
"Microsoft.Usage", | ||
"CA2215:Dispose methods should call base class dispose", | ||
"Microsoft.Usage", | ||
"CA2215:Dispose methods should call base class dispose", | ||
Justification = "See comments, this is intentional.")] | ||
protected override void Dispose(bool disposing) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,6 @@ | |
<owners>Microsoft</owners> | ||
<projectUrl>http://www.asp.net/web-api</projectUrl> | ||
<repository type="git" url="https://github.com/aspnet/AspNetWebStack"/> | ||
<requireLicenseAcceptance>true</requireLicenseAcceptance> | ||
<licenseUrl>http://www.microsoft.com/web/webpi/eula/mvc4extensions_prerelease_eula.htm</licenseUrl> | ||
Comment on lines
-11
to
-12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The two changes like this are part of our fix for #314. The rest is in internal build infrastructure. Yes, we are working toward including YAML in this repo for the builds. |
||
<description>The ASP.NET Web API Help Page automatically generates help page content for the web APIs on your site. Visitors to your help page can use this content to learn how to call your web APIs. Everything generated by the help page is fully customizable using ASP.NET MVC and Razor. ASP.NET Web API Help Page is a great addition to any ASP.NET Web API project.</description> | ||
<summary>The ASP.NET Web API Help Page automatically generates help page content for the web APIs on your site.</summary> | ||
<dependencies> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ private static Platform GetPlatform() | |
{ | ||
if (Type.GetType(_netCore20TypeName, throwOnError: false) != null) | ||
{ | ||
// Treat .NET Core 2.0 as a .NET 4.5 superset though internal types are different. | ||
// Treat .NET Core 2.1 as a .NET 4.5 superset though internal types are different. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. .NET Core 2.0 is out of support. 2.1 is also mostly out of support but ASP.NET Core 2.1.x is still getting updates for many packages (those that work on full "desktop" .NET Framework). |
||
return Platform.Net45; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the fix for #263 and #313