Skip to content

Commit

Permalink
Engine: Use HttpRequestFeature.Path instead of RawTarget
Browse files Browse the repository at this point in the history
HttpRequestFeature.RawTarget contains according to the documentation:
"This property contains the raw path and full query, as well as other
request targets such as * for OPTIONS requests".

We only want the Requset Path identifying the requested resource so
let's use HttpRequestFeature.Path.
  • Loading branch information
kennethmyhra committed Oct 13, 2022
1 parent 209a49a commit 02125be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Spark.Engine/Extensions/HttpRequestFhirExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static int GetPagingOffsetParameter(this HttpRequest request)
internal static string GetRequestUri(this HttpRequest request)
{
var httpRequestFeature = request.HttpContext.Features.Get<IHttpRequestFeature>();
return $"{request.Scheme}://{request.Host}{httpRequestFeature.RawTarget}";
return $"{request.Scheme}://{request.Host}{httpRequestFeature.Path}";
}

internal static DateTimeOffset? IfModifiedSince(this HttpRequest request)
Expand Down

0 comments on commit 02125be

Please sign in to comment.