mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-24 06:30:56 +02:00
fix query string parsing issue
This commit is contained in:
parent
bd2f385e56
commit
815240f920
|
@ -10,19 +10,19 @@ namespace MediaBrowser.Api.Images
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The max width
|
/// The max width
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? MaxWidth;
|
public int? MaxWidth { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The max height
|
/// The max height
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? MaxHeight;
|
public int? MaxHeight { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The width
|
/// The width
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? Width;
|
public int? Width { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The height
|
/// The height
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? Height;
|
public int? Height { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the quality.
|
/// Gets or sets the quality.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -207,54 +207,58 @@ namespace MediaBrowser.Common.Net
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RaiseReceiveWebRequest(context);
|
|
||||||
|
|
||||||
try
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
ProcessRequest(context);
|
RaiseReceiveWebRequest(context);
|
||||||
}
|
|
||||||
catch (InvalidOperationException ex)
|
|
||||||
{
|
|
||||||
HandleException(context.Response, ex, 422);
|
|
||||||
|
|
||||||
throw;
|
try
|
||||||
}
|
{
|
||||||
catch (ResourceNotFoundException ex)
|
ProcessRequest(context);
|
||||||
{
|
}
|
||||||
HandleException(context.Response, ex, 404);
|
catch (InvalidOperationException ex)
|
||||||
|
{
|
||||||
|
HandleException(context.Response, ex, 422);
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException ex)
|
catch (ResourceNotFoundException ex)
|
||||||
{
|
{
|
||||||
HandleException(context.Response, ex, 404);
|
HandleException(context.Response, ex, 404);
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
catch (DirectoryNotFoundException ex)
|
catch (FileNotFoundException ex)
|
||||||
{
|
{
|
||||||
HandleException(context.Response, ex, 404);
|
HandleException(context.Response, ex, 404);
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
catch (UnauthorizedAccessException ex)
|
catch (DirectoryNotFoundException ex)
|
||||||
{
|
{
|
||||||
HandleException(context.Response, ex, 401);
|
HandleException(context.Response, ex, 404);
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
catch (ArgumentException ex)
|
catch (UnauthorizedAccessException ex)
|
||||||
{
|
{
|
||||||
HandleException(context.Response, ex, 400);
|
HandleException(context.Response, ex, 401);
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (ArgumentException ex)
|
||||||
{
|
{
|
||||||
HandleException(context.Response, ex, 500);
|
HandleException(context.Response, ex, 400);
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
HandleException(context.Response, ex, 500);
|
||||||
|
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in a new issue