Browse Source

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
Tatsuhiro Tsujikawa 16 năm trước cách đây
mục cha
commit
d237c5e442
2 tập tin đã thay đổi với 7 bổ sung3 xóa
  1. 6 0
      ChangeLog
  2. 1 3
      src/HttpServerBodyCommand.cc

+ 6 - 0
ChangeLog

@@ -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

+ 1 - 3
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());