Просмотр исходного кода

Add MethodNotAllowedException with code 405

Joshua Boniface 6 лет назад
Родитель
Сommit
250e0c75df
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      Emby.Server.Implementations/HttpServer/HttpListenerHost.cs

+ 1 - 0
Emby.Server.Implementations/HttpServer/HttpListenerHost.cs

@@ -203,6 +203,7 @@ namespace Emby.Server.Implementations.HttpServer
                 case DirectoryNotFoundException _:
                 case DirectoryNotFoundException _:
                 case FileNotFoundException _:
                 case FileNotFoundException _:
                 case ResourceNotFoundException _: return 404;
                 case ResourceNotFoundException _: return 404;
+                case MethodNotAllowedException _: return 405;
                 case RemoteServiceUnavailableException _: return 502;
                 case RemoteServiceUnavailableException _: return 502;
                 default: return 500;
                 default: return 500;
             }
             }