ソースを参照

2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	* src/SocketCore.cc
	(isReadable): Added secure to the condition.
	* src/HttpConnection.cc
	(receiveResponse): Fixed a bug that causes no response header
	exception.
	* src/Peer.h
	(getFastSet): Fixed the return value type.
Tatsuhiro Tsujikawa 19 年 前
コミット
6497ed63d4
5 ファイル変更16 行追加3 行削除
  1. 10 0
      ChangeLog
  2. 3 1
      TODO
  3. 1 0
      src/HttpConnection.cc
  4. 1 1
      src/Peer.h
  5. 1 1
      src/SocketCore.cc

+ 10 - 0
ChangeLog

@@ -1,3 +1,13 @@
+2006-05-20  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	* src/SocketCore.cc
+	(isReadable): Added secure to the condition.
+	* src/HttpConnection.cc
+	(receiveResponse): Fixed a bug that causes no response header
+	exception.
+	* src/Peer.h
+	(getFastSet): Fixed the return value type.
+	
 2006-05-18  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	To remove a wait from download loop:

+ 3 - 1
TODO

@@ -16,4 +16,6 @@
 * Add announce-list support
 * Refacturing HttpConnection and FtpConnection
 * HTTP/FTP downloading regression test
-* Fast extension test
+* Fast extension test
+* send stop to the tracker when download finishes or ctrl-c enters.
+* fix flooding detection

+ 1 - 0
src/HttpConnection.cc

@@ -141,6 +141,7 @@ int HttpConnection::receiveResponse(HttpHeader& headers) {
   if((eohIndex = findEndOfHeader(headerBuf, "\r\n\r\n", hlenTemp)) == -1 &&
      (eohIndex = findEndOfHeader(headerBuf, "\n\n", hlenTemp)) == -1) {
     socket->readData(headerBuf+headerBufLength, size);
+    headerBufLength += size;
   } else {
     if(eohIndex[headerBuf] == '\n') {
       // for crapping non-standard HTTP server

+ 1 - 1
src/Peer.h

@@ -130,7 +130,7 @@ public:
   bool isFastExtensionEnabled() const { return fastExtensionEnabled; }
 
   void addFastSetIndex(int index);
-  const Integers getFastSet() const { return fastSet; }
+  const Integers& getFastSet() const { return fastSet; }
   bool isInFastSet(int index) const;
   int countFastSet() const { return fastSet.size(); }
 

+ 1 - 1
src/SocketCore.cc

@@ -235,7 +235,7 @@ bool SocketCore::isWritable(int timeout) const {
 
 bool SocketCore::isReadable(int timeout) const {
 #ifdef HAVE_LIBGNUTLS
-  if(peekBufLength > 0) {
+  if(secure && peekBufLength > 0) {
     return true;
   }
 #endif // HAVE_LIBGNUTLS