From afb8690a16f16890c322bdaf752574e4428a9c02 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 21 Apr 2016 00:00:21 +0300 Subject: [PATCH] Add the most common redirection statuses --- source/http/status.cpp | 2 ++ source/http/status.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source/http/status.cpp b/source/http/status.cpp index c5fdf96..b1949ec 100644 --- a/source/http/status.cpp +++ b/source/http/status.cpp @@ -11,6 +11,8 @@ ostream &operator<<(ostream &out, Status status) { case NONE: out<<"None"; break; case OK: out<<"OK"; break; + case MOVED_PERMANENTLY: out<<"Moved Permanently"; break; + case SEE_OTHER: out<<"See Other"; break; case BAD_REQUEST: out<<"Bad Request"; break; case FORBIDDEN: out<<"Forbidden"; break; case NOT_FOUND: out<<"Not Found"; break; diff --git a/source/http/status.h b/source/http/status.h index fe18a85..5e7d54b 100644 --- a/source/http/status.h +++ b/source/http/status.h @@ -10,6 +10,8 @@ enum Status { NONE = 0, OK = 200, + MOVED_PERMANENTLY = 301, + SEE_OTHER = 303, BAD_REQUEST = 400, FORBIDDEN = 403, NOT_FOUND = 404, -- 2.43.0