/* */ #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; } HttpProxyResponseCommand::~HttpProxyResponseCommand() {} bool HttpProxyResponseCommand::executeInternal(Segment segment) { HttpHeader headers; HttpConnection httpConnection(cuid, socket, e->option, e->logger); int status = httpConnection.receiveResponse(headers); if(status != 200) { throw new DlRetryEx(EX_PROXY_CONNECTION_FAILED); } HttpRequestCommand* command = new HttpRequestCommand(cuid, req, e, socket); e->commands.push(command); return true; }