mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-10-06 13:26:28 +00:00
fix(clients): verify C# client, read Content-Range from content headers
This commit is contained in:
@@ -22,7 +22,8 @@ public class Stub : HttpMessageHandler
|
||||
Request = request;
|
||||
Body = request.Content == null ? "" : await request.Content.ReadAsStringAsync(ct);
|
||||
var r = new HttpResponseMessage(_status) { Content = new StringContent(_json, Encoding.UTF8, "application/json") };
|
||||
foreach (var (k, v) in _headers) r.Headers.TryAddWithoutValidation(k, v);
|
||||
foreach (var (k, v) in _headers)
|
||||
if (!r.Headers.TryAddWithoutValidation(k, v)) r.Content.Headers.TryAddWithoutValidation(k, v);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user