Skip to content

Commit

Permalink
Properly send bad request response when failing to read request line
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden committed May 13, 2023
1 parent 2d5806d commit 4ea2d69
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Bunkum.CustomHttpListener/Listeners/SocketHttpListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public override void StartListening()
catch (Exception e)
{
this.Logger.LogError(HttpLogContext.Request, "Failed to read request line: " + e);
await new SocketListenerContext(client).SendResponse(HttpStatusCode.BadRequest);
return null;
}

Expand Down

0 comments on commit 4ea2d69

Please sign in to comment.