From 10b1ddd2c02050eacb138eead8e89bd8dda3a6cc Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 10 May 2008 04:57:33 +0000 Subject: [PATCH] 2008-05-10 Tatsuhiro Tsujikawa Renamed HttpNullDownloadCommand as HttpSkipResponseCommand * src/HttpResponseCommand.cc * src/HttpSkipResponseCommand.cc * src/HttpSkipResponseCommand.h --- ChangeLog | 7 +++++++ src/HttpResponseCommand.cc | 4 ++-- ...DownloadCommand.cc => HttpSkipResponseCommand.cc} | 12 ++++++------ ...llDownloadCommand.h => HttpSkipResponseCommand.h} | 12 ++++++------ src/Makefile.am | 2 +- src/Makefile.in | 8 ++++---- 6 files changed, 26 insertions(+), 19 deletions(-) rename src/{HttpNullDownloadCommand.cc => HttpSkipResponseCommand.cc} (94%) rename src/{HttpNullDownloadCommand.h => HttpSkipResponseCommand.h} (90%) diff --git a/ChangeLog b/ChangeLog index 116f727b..486e97a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-10 Tatsuhiro Tsujikawa + + Renamed HttpNullDownloadCommand as HttpSkipResponseCommand + * src/HttpResponseCommand.cc + * src/HttpSkipResponseCommand.cc + * src/HttpSkipResponseCommand.h + 2008-05-10 Tatsuhiro Tsujikawa Pool connection when a server returns 4xx, 5xx responses. diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc index efe070da..f2e6db7f 100644 --- a/src/HttpResponseCommand.cc +++ b/src/HttpResponseCommand.cc @@ -60,7 +60,7 @@ #include "message.h" #include "prefs.h" #include "StringFormat.h" -#include "HttpNullDownloadCommand.h" +#include "HttpSkipResponseCommand.h" namespace aria2 { @@ -197,7 +197,7 @@ bool HttpResponseCommand::skipResponseBody (const SharedHandle& httpResponse) { SharedHandle enc(getTransferEncoding(httpResponse)); - HttpNullDownloadCommand* command = new HttpNullDownloadCommand + HttpSkipResponseCommand* command = new HttpSkipResponseCommand (cuid, req, _requestGroup, httpConnection, httpResponse, e, socket); command->setTransferDecoder(enc); diff --git a/src/HttpNullDownloadCommand.cc b/src/HttpSkipResponseCommand.cc similarity index 94% rename from src/HttpNullDownloadCommand.cc rename to src/HttpSkipResponseCommand.cc index 4ff448a9..f58cf58d 100644 --- a/src/HttpNullDownloadCommand.cc +++ b/src/HttpSkipResponseCommand.cc @@ -32,7 +32,7 @@ * files in the program, then also delete it here. */ /* copyright --> */ -#include "HttpNullDownloadCommand.h" +#include "HttpSkipResponseCommand.h" #include "HttpConnection.h" #include "HttpResponse.h" #include "message.h" @@ -50,7 +50,7 @@ namespace aria2 { -HttpNullDownloadCommand::HttpNullDownloadCommand +HttpSkipResponseCommand::HttpSkipResponseCommand (int cuid, const SharedHandle& req, RequestGroup* requestGroup, @@ -65,15 +65,15 @@ HttpNullDownloadCommand::HttpNullDownloadCommand _receivedBytes(0) {} -HttpNullDownloadCommand::~HttpNullDownloadCommand() {} +HttpSkipResponseCommand::~HttpSkipResponseCommand() {} -void HttpNullDownloadCommand::setTransferDecoder +void HttpSkipResponseCommand::setTransferDecoder (const SharedHandle& transferDecoder) { _transferDecoder = transferDecoder; } -bool HttpNullDownloadCommand::executeInternal() +bool HttpSkipResponseCommand::executeInternal() { if(_totalLength == 0 && _transferDecoder.isNull()) { return processResponse(); @@ -122,7 +122,7 @@ bool HttpNullDownloadCommand::executeInternal() } } -bool HttpNullDownloadCommand::processResponse() +bool HttpSkipResponseCommand::processResponse() { if(_httpResponse->isRedirect()) { _httpResponse->processRedirect(); diff --git a/src/HttpNullDownloadCommand.h b/src/HttpSkipResponseCommand.h similarity index 90% rename from src/HttpNullDownloadCommand.h rename to src/HttpSkipResponseCommand.h index dd9678a3..d6c32e5f 100644 --- a/src/HttpNullDownloadCommand.h +++ b/src/HttpSkipResponseCommand.h @@ -32,8 +32,8 @@ * files in the program, then also delete it here. */ /* copyright --> */ -#ifndef _D_HTTP_NULL_DOWNLOAD_COMMAND_H_ -#define _D_HTTP_NULL_DOWNLOAD_COMMAND_H_ +#ifndef _D_HTTP_SKIP_RESPONSE_COMMAND_H_ +#define _D_HTTP_SKIP_RESPONSE_COMMAND_H_ #include "AbstractCommand.h" @@ -43,7 +43,7 @@ class HttpConnection; class HttpResponse; class TransferEncoding; -class HttpNullDownloadCommand : public AbstractCommand { +class HttpSkipResponseCommand : public AbstractCommand { private: SharedHandle _httpConnection; @@ -59,7 +59,7 @@ private: protected: virtual bool executeInternal(); public: - HttpNullDownloadCommand(int cuid, + HttpSkipResponseCommand(int cuid, const SharedHandle& req, RequestGroup* requestGroup, const SharedHandle& httpConnection, @@ -67,11 +67,11 @@ public: DownloadEngine* e, const SharedHandle& s); - virtual ~HttpNullDownloadCommand(); + virtual ~HttpSkipResponseCommand(); void setTransferDecoder(const SharedHandle& transferDecoder); }; } // namespace aria2 -#endif // _D_HTTP_NULL_DOWNLOAD_COMMAND_H_ +#endif // _D_HTTP_SKIP_RESPONSE_COMMAND_H_ diff --git a/src/Makefile.am b/src/Makefile.am index 8d48390d..7be1c2ab 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -184,7 +184,7 @@ SRCS = Socket.h\ ProtocolDetector.cc ProtocolDetector.h\ NullStatCalc.h\ StringFormat.cc StringFormat.h\ - HttpNullDownloadCommand.cc HttpNullDownloadCommand.h\ + HttpSkipResponseCommand.cc HttpSkipResponseCommand.h\ InitiateConnectionCommand.cc InitiateConnectionCommand.h\ FtpFinishDownloadCommand.cc FtpFinishDownloadCommand.h diff --git a/src/Makefile.in b/src/Makefile.in index b65a14d4..67837790 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -406,7 +406,7 @@ am__libaria2c_a_SOURCES_DIST = Socket.h SocketCore.cc SocketCore.h \ a2netcompat.h a2time.h array_fun.h help_tags.h prefs.h \ usage_text.h ProtocolDetector.cc ProtocolDetector.h \ NullStatCalc.h StringFormat.cc StringFormat.h \ - HttpNullDownloadCommand.cc HttpNullDownloadCommand.h \ + HttpSkipResponseCommand.cc HttpSkipResponseCommand.h \ InitiateConnectionCommand.cc InitiateConnectionCommand.h \ FtpFinishDownloadCommand.cc FtpFinishDownloadCommand.h \ AsyncNameResolver.cc AsyncNameResolver.h \ @@ -787,7 +787,7 @@ am__objects_15 = SocketCore.$(OBJEXT) Command.$(OBJEXT) \ HelpItem.$(OBJEXT) TaggedItem.$(OBJEXT) TagContainer.$(OBJEXT) \ HelpItemFactory.$(OBJEXT) SingleFileDownloadContext.$(OBJEXT) \ TimedHaltCommand.$(OBJEXT) ProtocolDetector.$(OBJEXT) \ - StringFormat.$(OBJEXT) HttpNullDownloadCommand.$(OBJEXT) \ + StringFormat.$(OBJEXT) HttpSkipResponseCommand.$(OBJEXT) \ InitiateConnectionCommand.$(OBJEXT) \ FtpFinishDownloadCommand.$(OBJEXT) $(am__objects_1) \ $(am__objects_2) $(am__objects_3) $(am__objects_4) \ @@ -1130,7 +1130,7 @@ SRCS = Socket.h SocketCore.cc SocketCore.h BinaryStream.h Command.cc \ a2netcompat.h a2time.h array_fun.h help_tags.h prefs.h \ usage_text.h ProtocolDetector.cc ProtocolDetector.h \ NullStatCalc.h StringFormat.cc StringFormat.h \ - HttpNullDownloadCommand.cc HttpNullDownloadCommand.h \ + HttpSkipResponseCommand.cc HttpSkipResponseCommand.h \ InitiateConnectionCommand.cc InitiateConnectionCommand.h \ FtpFinishDownloadCommand.cc FtpFinishDownloadCommand.h \ $(am__append_1) $(am__append_2) $(am__append_3) \ @@ -1393,13 +1393,13 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpHeader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpHeaderProcessor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpInitiateConnectionCommand.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpNullDownloadCommand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpProxyRequestCommand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpProxyResponseCommand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpRequest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpRequestCommand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpResponse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpResponseCommand.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpSkipResponseCommand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitialMetalinkParserState.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitiateConnectionCommand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitiateConnectionCommandFactory.Po@am__quote@