Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Commit

Permalink
Fix for issue #219.
Browse files Browse the repository at this point in the history
  • Loading branch information
piloitte committed Jul 5, 2020
1 parent 42c3b30 commit afda7d1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Chromely.Core/Defaults/DefaultRequestTaskRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ private ChromelyResponse ExecuteRoute(string requestId, RoutePath routePath, IDi

var response = route.Invoke(requestId: requestId, routePath: routePath, parameters: parameters, postData: postData, rawJson: requestData);
response.ReadyState = (int)ReadyState.ResponseIsReady;
response.Status = (int)System.Net.HttpStatusCode.OK;
response.StatusText = "OK";
response.Status = (response.Status == 0) ? (int)System.Net.HttpStatusCode.OK : response.Status;
response.StatusText = (string.IsNullOrWhiteSpace(response.StatusText)) ? "OK" : response.StatusText;

return response;
}
Expand All @@ -201,8 +201,8 @@ private async Task<ChromelyResponse> ExecuteRouteAsync(string requestId, RoutePa
}

response.ReadyState = (int)ReadyState.ResponseIsReady;
response.Status = (int)System.Net.HttpStatusCode.OK;
response.StatusText = "OK";
response.Status = (response.Status == 0 ) ? (int)System.Net.HttpStatusCode.OK : response.Status;
response.StatusText = (string.IsNullOrWhiteSpace(response.StatusText)) ? "OK" : response.StatusText;

return response;
}
Expand All @@ -224,8 +224,8 @@ private ChromelyResponse GetInfo(string requestId)
};

response.ReadyState = (int)ReadyState.ResponseIsReady;
response.Status = (int)System.Net.HttpStatusCode.OK;
response.StatusText = "OK";
response.Status = (response.Status == 0) ? (int)System.Net.HttpStatusCode.OK : response.Status;
response.StatusText = (string.IsNullOrWhiteSpace(response.StatusText)) ? "OK" : response.StatusText;
response.Data = infoItemDic;

return response;
Expand Down

0 comments on commit afda7d1

Please sign in to comment.