]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_http_errors.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rgw / rgw_http_errors.h
index a06d20529ade419edbe5ac486cb769b1c0d75448..5e052819e052e82f902c8922c7e5e313ce180027 100644 (file)
@@ -1,8 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab ft=cpp
 
-#ifndef RGW_HTTP_ERRORS_H_
-#define RGW_HTTP_ERRORS_H_
+#pragma once
 
 #include "rgw_common.h"
 
@@ -31,6 +30,8 @@ static inline int rgw_http_error_to_errno(int http_err)
         return -EACCES;
     case 404:
         return -ENOENT;
+    case 405:
+        return -ERR_METHOD_NOT_ALLOWED;
     case 409:
         return -ENOTEMPTY;
     case 503:
@@ -41,6 +42,3 @@ static inline int rgw_http_error_to_errno(int http_err)
 
   return 0; /* unreachable */
 }
-
-
-#endif