1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #ifndef RGW_HTTP_ERRORS_H_
5 #define RGW_HTTP_ERRORS_H_
7 #include "rgw_common.h"
9 typedef const std::map
<int,const std::pair
<int, const char*>> rgw_http_errors
;
11 extern rgw_http_errors rgw_http_s3_errors
;
13 extern rgw_http_errors rgw_http_swift_errors
;
15 extern rgw_http_errors rgw_http_sts_errors
;
17 extern rgw_http_errors rgw_http_iam_errors
;
19 static inline int rgw_http_error_to_errno(int http_err
)
21 if (http_err
>= 200 && http_err
<= 299)
25 return -ERR_NOT_MODIFIED
;
42 return 0; /* unreachable */