X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fhttp%2Fstatus.cpp;fp=source%2Fhttp%2Fstatus.cpp;h=6b95822ac0bac01c52091f58df923f91e9ba9a87;hb=cf8d2e48581eeb8f1b83e8c48321a0bc2ffa6d83;hp=0000000000000000000000000000000000000000;hpb=d683ca0964182e9579838fec8d7d100eeabddee0;p=libs%2Fnet.git diff --git a/source/http/status.cpp b/source/http/status.cpp new file mode 100644 index 0000000..6b95822 --- /dev/null +++ b/source/http/status.cpp @@ -0,0 +1,26 @@ +#include "status.h" + +using namespace std; + +namespace Msp { +namespace Http { + +ostream &operator<<(ostream &out, Status status) +{ + switch(status) + { + case NONE: out<<"None"; break; + case OK: out<<"OK"; break; + case BAD_REQUEST: out<<"Bad Request"; break; + case FORBIDDEN: out<<"Forbidden"; break; + case NOT_FOUND: out<<"Not Found"; break; + case INTERNAL_ERROR: out<<"Internal Error"; break; + case NOT_IMPLEMENTED: out<<"Not Implemented"; break; + default: out<<"Unknown Status"; break; + } + + return out; +} + +} // namespace Http +} // namespace Msp