Skip to content

Commit

Permalink
fix loss of Content-Type response header in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
atauenis committed Aug 28, 2023
1 parent ac27bf6 commit b60a890
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions HttpTransit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,10 @@ public void ProcessTransit()
ClientResponse.ProtocolVersion = new Version(1, 0);
ClientResponse.StatusCode = ResponseCode;
ClientResponse.AddHeader("Via", "HTTP/1.0 WebOne/" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
if (string.IsNullOrEmpty(ClientResponse.Headers["Content-Type"]) && !string.IsNullOrEmpty(ContentType))
{
ClientResponse.AddHeader("Content-Type", ContentType);
}

if (TransitStream == null)
{
Expand Down

0 comments on commit b60a890

Please sign in to comment.