From 3fe814bba9e5cbf6769d7b14c205f372abce73a0 Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 28 Oct 2021 11:28:41 +0100 Subject: [PATCH] http: permit custom status on redirect_exception There are various 3xx statuses we might want instead of the default 301. Signed-off-by: John Spray --- include/seastar/http/exception.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/seastar/http/exception.hh b/include/seastar/http/exception.hh index bb6630292b3..df91e3cf4d5 100644 --- a/include/seastar/http/exception.hh +++ b/include/seastar/http/exception.hh @@ -61,8 +61,8 @@ private: */ class redirect_exception : public base_exception { public: - redirect_exception(const std::string& url) - : base_exception("", reply::status_type::moved_permanently), url( + redirect_exception(const std::string& url, reply::status_type status = reply::status_type::moved_permanently) + : base_exception("", status), url( url) { } std::string url;