]> git.tdb.fi Git - libs/net.git/blob - source/http/status.cpp
b1949ec4423761b6287b5676474042ac06f0bfa2
[libs/net.git] / source / http / status.cpp
1 #include "status.h"
2
3 using namespace std;
4
5 namespace Msp {
6 namespace Http {
7
8 ostream &operator<<(ostream &out, Status status)
9 {
10         switch(status)
11         {
12         case NONE: out<<"None"; break;
13         case OK: out<<"OK"; break;
14         case MOVED_PERMANENTLY: out<<"Moved Permanently"; break;
15         case SEE_OTHER: out<<"See Other"; break;
16         case BAD_REQUEST: out<<"Bad Request"; break;
17         case FORBIDDEN: out<<"Forbidden"; break;
18         case NOT_FOUND: out<<"Not Found"; break;
19         case METHOD_NOT_ALLOWED: out<<"Method not allowed"; break;
20         case INTERNAL_ERROR: out<<"Internal Error"; break;
21         case NOT_IMPLEMENTED: out<<"Not Implemented"; break;
22         default: out<<"Unknown Status"; break;
23         }
24
25         return out;
26 }
27
28 } // namespace Http
29 } // namespace Msp