about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--MatrixMediaGate/Program.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/MatrixMediaGate/Program.cs b/MatrixMediaGate/Program.cs

index 658ef89..353858b 100644 --- a/MatrixMediaGate/Program.cs +++ b/MatrixMediaGate/Program.cs
@@ -34,7 +34,8 @@ async Task Proxy(HttpClient hc, ProxyConfiguration cfg, HttpContext ctx, ILogger if (ctx.Request.ContentLength > 0) { req.Content = new StreamContent(ctx.Request.Body); - if (ctx.Request.ContentType != null) req.Content.Headers.ContentType = new MediaTypeHeaderValue(ctx.Request.ContentType); + if (ctx.Request.ContentType != null) req.Content.Headers.ContentType = MediaTypeHeaderValue.Parse(ctx.Request.ContentType); + if (ctx.Request.ContentLength != null) req.Content.Headers.ContentLength = ctx.Request.ContentLength; }