summaryrefslogtreecommitdiff
path: root/src/HttpServerBodyCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-03-25 22:10:36 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-03-25 22:10:36 +0900
commit06b6bef860d6ac232c6372829b8415160b48f220 (patch)
treee56c3d9ceb191054ede941f5109267fffa736d92 /src/HttpServerBodyCommand.cc
parent8499a47d21b73e78bc1030684b2cd187b05360cc (diff)
Made WebSocket handshake more strict.
Refactored HttpServer as well.
Diffstat (limited to 'src/HttpServerBodyCommand.cc')
-rw-r--r--src/HttpServerBodyCommand.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc
index 48581532..d420d788 100644
--- a/src/HttpServerBodyCommand.cc
+++ b/src/HttpServerBodyCommand.cc
@@ -104,16 +104,16 @@ void HttpServerBodyCommand::sendJsonRpcResponse
getJsonRpcContentType(!callback.empty()));
} else {
httpServer_->disableKeepAlive();
- std::string httpCode;
+ int httpCode;
switch(res.code) {
case -32600:
- httpCode = "400 Bad Request";
+ httpCode = 400;
break;
case -32601:
- httpCode = "404 Not Found";
+ httpCode = 404;
break;
default:
- httpCode = "500 Internal Server Error";
+ httpCode = 500;
};
httpServer_->feedResponse(httpCode, A2STR::NIL,
responseData,