comparison Core/HttpServer/HttpOutput.cpp @ 477:6f8ae46ed90e

moves
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 15 Jul 2013 21:27:49 +0200
parents 72cca077abf8
children 08eca5d86aad
comparison
equal deleted inserted replaced
476:4aae0261515e 477:6f8ae46ed90e
101 101
102 102
103 void HttpOutput::SendMethodNotAllowedError(const std::string& allowed) 103 void HttpOutput::SendMethodNotAllowedError(const std::string& allowed)
104 { 104 {
105 std::string s = 105 std::string s =
106 "HTTP/1.1 405 " + std::string(Toolbox::ToString(HttpStatus_405_MethodNotAllowed)) + 106 "HTTP/1.1 405 " + std::string(EnumerationToString(HttpStatus_405_MethodNotAllowed)) +
107 "\r\nAllow: " + allowed + 107 "\r\nAllow: " + allowed +
108 "\r\n\r\n"; 108 "\r\n\r\n";
109 Send(&s[0], s.size()); 109 Send(&s[0], s.size());
110 } 110 }
111 111
124 124
125 void HttpOutput::SendHeaderInternal(HttpStatus status) 125 void HttpOutput::SendHeaderInternal(HttpStatus status)
126 { 126 {
127 std::string s = "HTTP/1.1 " + 127 std::string s = "HTTP/1.1 " +
128 boost::lexical_cast<std::string>(status) + 128 boost::lexical_cast<std::string>(status) +
129 " " + std::string(Toolbox::ToString(status)) + 129 " " + std::string(EnumerationToString(status)) +
130 "\r\n\r\n"; 130 "\r\n\r\n";
131 Send(&s[0], s.size()); 131 Send(&s[0], s.size());
132 } 132 }
133 133
134 134
187 187
188 188
189 void HttpOutput::Redirect(const std::string& path) 189 void HttpOutput::Redirect(const std::string& path)
190 { 190 {
191 std::string s = 191 std::string s =
192 "HTTP/1.1 301 " + std::string(Toolbox::ToString(HttpStatus_301_MovedPermanently)) + 192 "HTTP/1.1 301 " + std::string(EnumerationToString(HttpStatus_301_MovedPermanently)) +
193 "\r\nLocation: " + path + 193 "\r\nLocation: " + path +
194 "\r\n\r\n"; 194 "\r\n\r\n";
195 Send(&s[0], s.size()); 195 Send(&s[0], s.size());
196 } 196 }
197 } 197 }