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
pull/1/head
Tatsuhiro Tsujikawa 2009-05-09 15:36:15 +00:00
parent 9f0a602ce3
commit d237c5e442
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,9 @@
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
2009-05-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed --enable-http-server and --http-server-listen-port

View File

@ -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());