mirror of https://github.com/aria2/aria2
2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Renamed HttpNullDownloadCommand as HttpSkipResponseCommand * src/HttpResponseCommand.cc * src/HttpSkipResponseCommand.cc * src/HttpSkipResponseCommand.hpull/1/head
parent
03db925988
commit
10b1ddd2c0
|
@ -1,3 +1,10 @@
|
||||||
|
2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Renamed HttpNullDownloadCommand as HttpSkipResponseCommand
|
||||||
|
* src/HttpResponseCommand.cc
|
||||||
|
* src/HttpSkipResponseCommand.cc
|
||||||
|
* src/HttpSkipResponseCommand.h
|
||||||
|
|
||||||
2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Pool connection when a server returns 4xx, 5xx responses.
|
Pool connection when a server returns 4xx, 5xx responses.
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "prefs.h"
|
#include "prefs.h"
|
||||||
#include "StringFormat.h"
|
#include "StringFormat.h"
|
||||||
#include "HttpNullDownloadCommand.h"
|
#include "HttpSkipResponseCommand.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ bool HttpResponseCommand::skipResponseBody
|
||||||
(const SharedHandle<HttpResponse>& httpResponse)
|
(const SharedHandle<HttpResponse>& httpResponse)
|
||||||
{
|
{
|
||||||
SharedHandle<TransferEncoding> enc(getTransferEncoding(httpResponse));
|
SharedHandle<TransferEncoding> enc(getTransferEncoding(httpResponse));
|
||||||
HttpNullDownloadCommand* command = new HttpNullDownloadCommand
|
HttpSkipResponseCommand* command = new HttpSkipResponseCommand
|
||||||
(cuid, req, _requestGroup, httpConnection, httpResponse, e, socket);
|
(cuid, req, _requestGroup, httpConnection, httpResponse, e, socket);
|
||||||
command->setTransferDecoder(enc);
|
command->setTransferDecoder(enc);
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
* files in the program, then also delete it here.
|
* files in the program, then also delete it here.
|
||||||
*/
|
*/
|
||||||
/* copyright --> */
|
/* copyright --> */
|
||||||
#include "HttpNullDownloadCommand.h"
|
#include "HttpSkipResponseCommand.h"
|
||||||
#include "HttpConnection.h"
|
#include "HttpConnection.h"
|
||||||
#include "HttpResponse.h"
|
#include "HttpResponse.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
HttpNullDownloadCommand::HttpNullDownloadCommand
|
HttpSkipResponseCommand::HttpSkipResponseCommand
|
||||||
(int cuid,
|
(int cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
|
@ -65,15 +65,15 @@ HttpNullDownloadCommand::HttpNullDownloadCommand
|
||||||
_receivedBytes(0)
|
_receivedBytes(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
HttpNullDownloadCommand::~HttpNullDownloadCommand() {}
|
HttpSkipResponseCommand::~HttpSkipResponseCommand() {}
|
||||||
|
|
||||||
void HttpNullDownloadCommand::setTransferDecoder
|
void HttpSkipResponseCommand::setTransferDecoder
|
||||||
(const SharedHandle<TransferEncoding>& transferDecoder)
|
(const SharedHandle<TransferEncoding>& transferDecoder)
|
||||||
{
|
{
|
||||||
_transferDecoder = transferDecoder;
|
_transferDecoder = transferDecoder;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HttpNullDownloadCommand::executeInternal()
|
bool HttpSkipResponseCommand::executeInternal()
|
||||||
{
|
{
|
||||||
if(_totalLength == 0 && _transferDecoder.isNull()) {
|
if(_totalLength == 0 && _transferDecoder.isNull()) {
|
||||||
return processResponse();
|
return processResponse();
|
||||||
|
@ -122,7 +122,7 @@ bool HttpNullDownloadCommand::executeInternal()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HttpNullDownloadCommand::processResponse()
|
bool HttpSkipResponseCommand::processResponse()
|
||||||
{
|
{
|
||||||
if(_httpResponse->isRedirect()) {
|
if(_httpResponse->isRedirect()) {
|
||||||
_httpResponse->processRedirect();
|
_httpResponse->processRedirect();
|
|
@ -32,8 +32,8 @@
|
||||||
* files in the program, then also delete it here.
|
* files in the program, then also delete it here.
|
||||||
*/
|
*/
|
||||||
/* copyright --> */
|
/* copyright --> */
|
||||||
#ifndef _D_HTTP_NULL_DOWNLOAD_COMMAND_H_
|
#ifndef _D_HTTP_SKIP_RESPONSE_COMMAND_H_
|
||||||
#define _D_HTTP_NULL_DOWNLOAD_COMMAND_H_
|
#define _D_HTTP_SKIP_RESPONSE_COMMAND_H_
|
||||||
|
|
||||||
#include "AbstractCommand.h"
|
#include "AbstractCommand.h"
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class HttpConnection;
|
||||||
class HttpResponse;
|
class HttpResponse;
|
||||||
class TransferEncoding;
|
class TransferEncoding;
|
||||||
|
|
||||||
class HttpNullDownloadCommand : public AbstractCommand {
|
class HttpSkipResponseCommand : public AbstractCommand {
|
||||||
private:
|
private:
|
||||||
SharedHandle<HttpConnection> _httpConnection;
|
SharedHandle<HttpConnection> _httpConnection;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ private:
|
||||||
protected:
|
protected:
|
||||||
virtual bool executeInternal();
|
virtual bool executeInternal();
|
||||||
public:
|
public:
|
||||||
HttpNullDownloadCommand(int cuid,
|
HttpSkipResponseCommand(int cuid,
|
||||||
const SharedHandle<Request>& req,
|
const SharedHandle<Request>& req,
|
||||||
RequestGroup* requestGroup,
|
RequestGroup* requestGroup,
|
||||||
const SharedHandle<HttpConnection>& httpConnection,
|
const SharedHandle<HttpConnection>& httpConnection,
|
||||||
|
@ -67,11 +67,11 @@ public:
|
||||||
DownloadEngine* e,
|
DownloadEngine* e,
|
||||||
const SharedHandle<SocketCore>& s);
|
const SharedHandle<SocketCore>& s);
|
||||||
|
|
||||||
virtual ~HttpNullDownloadCommand();
|
virtual ~HttpSkipResponseCommand();
|
||||||
|
|
||||||
void setTransferDecoder(const SharedHandle<TransferEncoding>& transferDecoder);
|
void setTransferDecoder(const SharedHandle<TransferEncoding>& transferDecoder);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace aria2
|
} // namespace aria2
|
||||||
|
|
||||||
#endif // _D_HTTP_NULL_DOWNLOAD_COMMAND_H_
|
#endif // _D_HTTP_SKIP_RESPONSE_COMMAND_H_
|
|
@ -184,7 +184,7 @@ SRCS = Socket.h\
|
||||||
ProtocolDetector.cc ProtocolDetector.h\
|
ProtocolDetector.cc ProtocolDetector.h\
|
||||||
NullStatCalc.h\
|
NullStatCalc.h\
|
||||||
StringFormat.cc StringFormat.h\
|
StringFormat.cc StringFormat.h\
|
||||||
HttpNullDownloadCommand.cc HttpNullDownloadCommand.h\
|
HttpSkipResponseCommand.cc HttpSkipResponseCommand.h\
|
||||||
InitiateConnectionCommand.cc InitiateConnectionCommand.h\
|
InitiateConnectionCommand.cc InitiateConnectionCommand.h\
|
||||||
FtpFinishDownloadCommand.cc FtpFinishDownloadCommand.h
|
FtpFinishDownloadCommand.cc FtpFinishDownloadCommand.h
|
||||||
|
|
||||||
|
|
|
@ -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 \
|
a2netcompat.h a2time.h array_fun.h help_tags.h prefs.h \
|
||||||
usage_text.h ProtocolDetector.cc ProtocolDetector.h \
|
usage_text.h ProtocolDetector.cc ProtocolDetector.h \
|
||||||
NullStatCalc.h StringFormat.cc StringFormat.h \
|
NullStatCalc.h StringFormat.cc StringFormat.h \
|
||||||
HttpNullDownloadCommand.cc HttpNullDownloadCommand.h \
|
HttpSkipResponseCommand.cc HttpSkipResponseCommand.h \
|
||||||
InitiateConnectionCommand.cc InitiateConnectionCommand.h \
|
InitiateConnectionCommand.cc InitiateConnectionCommand.h \
|
||||||
FtpFinishDownloadCommand.cc FtpFinishDownloadCommand.h \
|
FtpFinishDownloadCommand.cc FtpFinishDownloadCommand.h \
|
||||||
AsyncNameResolver.cc AsyncNameResolver.h \
|
AsyncNameResolver.cc AsyncNameResolver.h \
|
||||||
|
@ -787,7 +787,7 @@ am__objects_15 = SocketCore.$(OBJEXT) Command.$(OBJEXT) \
|
||||||
HelpItem.$(OBJEXT) TaggedItem.$(OBJEXT) TagContainer.$(OBJEXT) \
|
HelpItem.$(OBJEXT) TaggedItem.$(OBJEXT) TagContainer.$(OBJEXT) \
|
||||||
HelpItemFactory.$(OBJEXT) SingleFileDownloadContext.$(OBJEXT) \
|
HelpItemFactory.$(OBJEXT) SingleFileDownloadContext.$(OBJEXT) \
|
||||||
TimedHaltCommand.$(OBJEXT) ProtocolDetector.$(OBJEXT) \
|
TimedHaltCommand.$(OBJEXT) ProtocolDetector.$(OBJEXT) \
|
||||||
StringFormat.$(OBJEXT) HttpNullDownloadCommand.$(OBJEXT) \
|
StringFormat.$(OBJEXT) HttpSkipResponseCommand.$(OBJEXT) \
|
||||||
InitiateConnectionCommand.$(OBJEXT) \
|
InitiateConnectionCommand.$(OBJEXT) \
|
||||||
FtpFinishDownloadCommand.$(OBJEXT) $(am__objects_1) \
|
FtpFinishDownloadCommand.$(OBJEXT) $(am__objects_1) \
|
||||||
$(am__objects_2) $(am__objects_3) $(am__objects_4) \
|
$(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 \
|
a2netcompat.h a2time.h array_fun.h help_tags.h prefs.h \
|
||||||
usage_text.h ProtocolDetector.cc ProtocolDetector.h \
|
usage_text.h ProtocolDetector.cc ProtocolDetector.h \
|
||||||
NullStatCalc.h StringFormat.cc StringFormat.h \
|
NullStatCalc.h StringFormat.cc StringFormat.h \
|
||||||
HttpNullDownloadCommand.cc HttpNullDownloadCommand.h \
|
HttpSkipResponseCommand.cc HttpSkipResponseCommand.h \
|
||||||
InitiateConnectionCommand.cc InitiateConnectionCommand.h \
|
InitiateConnectionCommand.cc InitiateConnectionCommand.h \
|
||||||
FtpFinishDownloadCommand.cc FtpFinishDownloadCommand.h \
|
FtpFinishDownloadCommand.cc FtpFinishDownloadCommand.h \
|
||||||
$(am__append_1) $(am__append_2) $(am__append_3) \
|
$(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)/HttpHeader.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpHeaderProcessor.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)/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)/HttpProxyRequestCommand.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpProxyResponseCommand.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)/HttpRequest.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpRequestCommand.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)/HttpResponse.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HttpResponseCommand.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)/InitialMetalinkParserState.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitiateConnectionCommand.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@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitiateConnectionCommandFactory.Po@am__quote@
|
||||||
|
|
Loading…
Reference in New Issue