From: Mikko Rasa Date: Wed, 20 Apr 2016 21:00:21 +0000 (+0300) Subject: Add the most common redirection statuses X-Git-Url: http://git.tdb.fi/?p=libs%2Fnet.git;a=commitdiff_plain;h=afb8690a16f16890c322bdaf752574e4428a9c02 Add the most common redirection statuses --- 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,