Skip to content

Commit

Permalink
Merge pull request #1380 from Badgerati/Issue-1291
Browse files Browse the repository at this point in the history
Quickfix to set C# language version to 7.3, which is officially supported by .NET
  • Loading branch information
Badgerati authored Aug 30, 2024
2 parents 9bd51aa + 98e2dd5 commit b7c9431
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Listener/Pode.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<NoWarn>$(NoWarn);SYSLIB0001</NoWarn>
<LangVersion>9.0</LangVersion>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Listener/PodeContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class PodeContext : PodeProtocol, IDisposable
public Hashtable Data { get; private set; }
public string EndpointName => PodeSocket.Name;

private object _lockable = new();
private object _lockable = new object();

private PodeContextState _state;
public PodeContextState State
Expand Down
5 changes: 4 additions & 1 deletion src/Listener/PodeHttpRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ private int ParseHeaders(string[] reqLines)
private async Task ParseBody(byte[] bytes, string newline, int start, CancellationToken cancellationToken)
{
// set the body stream
BodyStream ??= new MemoryStream();
if (BodyStream == default(MemoryStream))
{
BodyStream = new MemoryStream();
}

// are we chunked?
var isChunked = !string.IsNullOrWhiteSpace(TransferEncoding) && TransferEncoding.Contains("chunked");
Expand Down

0 comments on commit b7c9431

Please sign in to comment.