Change HttpRequestAction activity to store headers in dictionary
This fixes a deserialization issue with MongoDb that cannot deserialize StringValues.
This commit is contained in:
parent
1cdf67d2ae
commit
9bd00619c8
|
|
@ -159,8 +159,8 @@ namespace Elsa.Activities.Http.Activities
|
|||
var responseModel = new HttpResponseModel
|
||||
{
|
||||
StatusCode = response.StatusCode,
|
||||
Headers = new HeaderDictionary(
|
||||
response.Headers.ToDictionary(x => x.Key, x => new StringValues(x.Value.ToArray()))
|
||||
Headers = new Dictionary<string, string[]>(
|
||||
response.Headers.ToDictionary(x => x.Key, x => x.Value.ToArray())
|
||||
)
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Elsa.Activities.Http.Models
|
||||
{
|
||||
|
|
@ -10,7 +10,7 @@ namespace Elsa.Activities.Http.Models
|
|||
}
|
||||
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
public IHeaderDictionary Headers { get; set; } = new HeaderDictionary();
|
||||
public Dictionary<string, string[]> Headers { get; set; } = new Dictionary<string, string[]>();
|
||||
public byte[] Content { get; set; }
|
||||
public object ParsedContent { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,9 +66,7 @@ namespace Elsa.Activities.Timers.Activities
|
|||
var now = clock.GetCurrentInstant();
|
||||
|
||||
if (StartTime == null)
|
||||
{
|
||||
StartTime = now;
|
||||
}
|
||||
|
||||
var timeSpan = await expressionEvaluator.EvaluateAsync(TimeoutExpression, context, cancellationToken);
|
||||
var expiresAt = StartTime.Value.ToDateTimeUtc() + timeSpan;
|
||||
|
|
|
|||
Loading…
Reference in a new issue