summaryrefslogtreecommitdiff
path: root/src/HttpServerBodyCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-05-09 15:36:15 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-05-09 15:36:15 +0000
commitd237c5e442ea2c7963837bb94d90ff2940b34830 (patch)
tree11f2cafeb0786a3b6f9cbf5584b49e25af10736a /src/HttpServerBodyCommand.cc
parent9f0a602ce3d2ffb4426fc6f0da0db257fbc90333 (diff)
2009-05-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that SocketCore::isReadable() prevents aria2 from processing 0 length request. * src/HttpServerBodyCommand.cc
Diffstat (limited to 'src/HttpServerBodyCommand.cc')
-rw-r--r--src/HttpServerBodyCommand.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc
index 6ed81ec5..04d57647 100644
--- a/src/HttpServerBodyCommand.cc
+++ b/src/HttpServerBodyCommand.cc
@@ -74,15 +74,13 @@ bool HttpServerBodyCommand::execute()
if(_e->_requestGroupMan->downloadFinished() || _e->isHaltRequested()) {
return true;
}
- if(_socket->isReadable(0)) {
+ if(_socket->isReadable(0) || _httpServer->getContentLength() == 0) {
_timeout.reset();
try {
if(_httpServer->receiveBody()) {
// Do something for requestpath and body
if(_httpServer->getRequestPath() == "/rpc") {
- // For xml-rpc, disable keep-alive
- //_httpServer->disableKeepAlive();
xmlrpc::XmlRpcRequest req =
xmlrpc::XmlRpcRequestProcessor().parseMemory(_httpServer->getBody());