Skip to content

Commit

Permalink
Fixing issue where response type was not getting set
Browse files Browse the repository at this point in the history
  • Loading branch information
wshaddix committed Jul 16, 2018
1 parent a49f3a1 commit cffb94d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ExampleHandlers/Tracing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public Task<MicroserviceMessage> HandleAsync(MicroserviceMessage msg)
// add a trace header to the msg
var traceId = Guid.NewGuid().ToString("N");
msg.RequestHeaders.Add(headerName, traceId);
msg.ResponseHeaders.Add(headerName, traceId);

Log.Information("Added trace id of {TraceId} to the message", traceId);
}
Expand Down
3 changes: 3 additions & 0 deletions src/Proxy/HttpResponseFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ internal static async void PrepareResponseAsync(HttpResponse httpResponse,
// set the status code
httpResponse.StatusCode = message.ResponseStatusCode;

// set the response type
httpResponse.ContentType = message.ResponseContentType;

// set any response headers
foreach (var header in message.ResponseHeaders)
{
Expand Down

0 comments on commit cffb94d

Please sign in to comment.