diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-01-05 16:01:46 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-01-05 16:01:46 +0000 |
| commit | 4db349c1f32b4a313d12d114137432441633d00a (patch) | |
| tree | 417451971e264834312cfd8339c79930d680a5d1 /src/HttpServerBodyCommand.cc | |
| parent | 338e8aca09331d3e7fa4e1e8e1f9d10260986772 (diff) | |
2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80
columns.
* src
* test
Diffstat (limited to 'src/HttpServerBodyCommand.cc')
| -rw-r--r-- | src/HttpServerBodyCommand.cc | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc index c40efde1..07ac5d7a 100644 --- a/src/HttpServerBodyCommand.cc +++ b/src/HttpServerBodyCommand.cc @@ -16,7 +16,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * In addition, as a special exception, the copyright holders give * permission to link the code of portions of this program with the @@ -82,39 +82,39 @@ bool HttpServerBodyCommand::execute() _timeout.reset(); if(_httpServer->receiveBody()) { - // Do something for requestpath and body - if(_httpServer->getRequestPath() == "/rpc") { - xmlrpc::XmlRpcRequest req = - xmlrpc::XmlRpcRequestProcessor().parseMemory(_httpServer->getBody()); - - SharedHandle<xmlrpc::XmlRpcMethod> method = - xmlrpc::XmlRpcMethodFactory::create(req._methodName); - xmlrpc::XmlRpcResponse res = method->execute(req, _e); - _httpServer->feedResponse(res.toXml(), "text/xml"); - Command* command = - new HttpServerResponseCommand(cuid, _httpServer, _e, _socket); - _e->commands.push_back(command); - _e->setNoWait(true); - return true; - } else { - return true; - } + // Do something for requestpath and body + if(_httpServer->getRequestPath() == "/rpc") { + xmlrpc::XmlRpcRequest req = + xmlrpc::XmlRpcRequestProcessor().parseMemory(_httpServer->getBody()); + + SharedHandle<xmlrpc::XmlRpcMethod> method = + xmlrpc::XmlRpcMethodFactory::create(req._methodName); + xmlrpc::XmlRpcResponse res = method->execute(req, _e); + _httpServer->feedResponse(res.toXml(), "text/xml"); + Command* command = + new HttpServerResponseCommand(cuid, _httpServer, _e, _socket); + _e->commands.push_back(command); + _e->setNoWait(true); + return true; + } else { + return true; + } } else { - _e->commands.push_back(this); - return false; - } + _e->commands.push_back(this); + return false; + } } else { if(_timeout.elapsed(30)) { - logger->info("HTTP request body timeout."); - return true; + logger->info("HTTP request body timeout."); + return true; } else { - _e->commands.push_back(this); - return false; + _e->commands.push_back(this); + return false; } } } catch(RecoverableException& e) { logger->info("CUID#%d - Error occurred while reading HTTP request body", - e, cuid); + e, cuid); return true; } |
