From 74a07f6d1c52533aa648da27cb3924d6bb41bb19 Mon Sep 17 00:00:00 2001 From: Patrick Barron Date: Fri, 13 Jan 2023 21:37:37 -0500 Subject: Move Middleware to Jellyfin.Api --- .../Middleware/QueryStringDecodingMiddleware.cs | 39 ---------------------- 1 file changed, 39 deletions(-) delete mode 100644 Jellyfin.Server/Middleware/QueryStringDecodingMiddleware.cs (limited to 'Jellyfin.Server/Middleware/QueryStringDecodingMiddleware.cs') diff --git a/Jellyfin.Server/Middleware/QueryStringDecodingMiddleware.cs b/Jellyfin.Server/Middleware/QueryStringDecodingMiddleware.cs deleted file mode 100644 index 24807ce38..000000000 --- a/Jellyfin.Server/Middleware/QueryStringDecodingMiddleware.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Http.Features; - -namespace Jellyfin.Server.Middleware -{ - /// - /// URL decodes the querystring before binding. - /// - public class QueryStringDecodingMiddleware - { - private readonly RequestDelegate _next; - - /// - /// Initializes a new instance of the class. - /// - /// The next delegate in the pipeline. - public QueryStringDecodingMiddleware(RequestDelegate next) - { - _next = next; - } - - /// - /// Executes the middleware action. - /// - /// The current HTTP context. - /// The async task. - public async Task Invoke(HttpContext httpContext) - { - var feature = httpContext.Features.Get(); - if (feature is not null) - { - httpContext.Features.Set(new UrlDecodeQueryFeature(feature)); - } - - await _next(httpContext).ConfigureAwait(false); - } - } -} -- cgit v1.2.3