diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2006-02-22 16:01:54 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2006-02-22 16:01:54 +0000 |
| commit | 44beebd257b0fb265bea5387850b9beb33c0adc2 (patch) | |
| tree | 0ec08e4aad18ccff2d578aca1c0b3799d2716c6c /src/HttpProxyResponseCommand.cc | |
| parent | d027ca8e7c383e9755d6fb997e8a880df99e88b9 (diff) | |
| parent | 87a229cab18679042beb06076e5dec1dcfadaeae (diff) | |
Tagging release 0.2.0 of aria2release-0.2.0
Diffstat (limited to 'src/HttpProxyResponseCommand.cc')
| -rw-r--r-- | src/HttpProxyResponseCommand.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/HttpProxyResponseCommand.cc b/src/HttpProxyResponseCommand.cc index e62d3939..cb2764b9 100644 --- a/src/HttpProxyResponseCommand.cc +++ b/src/HttpProxyResponseCommand.cc @@ -22,19 +22,24 @@ #include "HttpProxyResponseCommand.h" #include "HttpRequestCommand.h" #include "DlRetryEx.h" -#include "HttpConnection.h" #include "message.h" HttpProxyResponseCommand::HttpProxyResponseCommand(int cuid, Request* req, DownloadEngine* e, Socket* s):AbstractCommand(cuid, req, e, s) { - AbstractCommand::checkSocketIsReadable = true; + http = new HttpConnection(cuid, socket, req, e->option, e->logger); } -HttpProxyResponseCommand::~HttpProxyResponseCommand() {} +HttpProxyResponseCommand::~HttpProxyResponseCommand() { + delete http; +} bool HttpProxyResponseCommand::executeInternal(Segment segment) { HttpHeader headers; - HttpConnection httpConnection(cuid, socket, e->option, e->logger); - int status = httpConnection.receiveResponse(headers); + int status = http->receiveResponse(headers); + if(status == 0) { + // we didn't receive all of headers yet. + e->commands.push(this); + return false; + } if(status != 200) { throw new DlRetryEx(EX_PROXY_CONNECTION_FAILED); } |
