fix query string parsing issue

This commit is contained in:
LukePulverenti 2013-02-21 02:00:04 -05:00
parent bd2f385e56
commit 815240f920
2 changed files with 47 additions and 43 deletions

View file

@ -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>

View file

@ -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>