Downloader.cc
Go to the documentation of this file.
61std::ostream &
70Downloader::Downloader(const SBuf &url, const AsyncCallback<Answer> &cb, const MasterXactionPointer &mx, const unsigned int level):
191Downloader::handleReply(clientStreamNode * node, ClientHttpRequest *http, HttpReply *reply, StoreIOBuffer receivedData)
193 DownloaderContext::Pointer callerContext = dynamic_cast<DownloaderContext *>(node->data.getRaw());
209 const bool tooLarge = (existingContent > -1 && existingContent > static_cast<int64_t>(maxSize)) ||
#define CallJobHere(debugSection, debugLevel, job, Class, method)
Definition: AsyncJobCalls.h:58
static void downloaderDetach(clientStreamNode *node, ClientHttpRequest *http)
Definition: Downloader.cc:127
std::ostream & operator<<(std::ostream &os, const DownloaderAnswer &answer)
Definition: Downloader.cc:62
static void downloaderRecipient(clientStreamNode *node, ClientHttpRequest *http, HttpReply *rep, StoreIOBuffer receivedData)
Definition: Downloader.cc:105
#define RefCountable
The locking interface for use on Reference-Counted classes.
Definition: Lock.h:66
a smart AsyncCall pointer for delivery of future results
Definition: AsyncCallbacks.h:32
Definition: AsyncJob.h:32
Definition: client_side_request.h:38
struct ClientHttpRequest::Out out
void initRequest(HttpRequest *)
Definition: client_side_request.cc:1609
size_t req_sz
raw request size on input, not current request size
Definition: client_side_request.h:162
ClientRequestContext * calloutContext
Definition: client_side_request.h:179
Definition: ClientRequestContext.h:29
Definition: Downloader.cc:25
MEMPROXY_CLASS(DownloaderContext)
DownloaderContext(Downloader *dl, ClientHttpRequest *h)
Definition: Downloader.cc:40
Definition: Downloader.h:46
Downloader(const SBuf &url, const AsyncCallback< Answer > &, const MasterXactionPointer &, unsigned int level=0)
Definition: Downloader.cc:70
DownloaderContextPointer context_
Pointer to an object that stores the clientStream required info.
Definition: Downloader.h:87
bool buildRequest()
Initializes and starts the HTTP GET request to the remote server.
Definition: Downloader.cc:135
void handleReply(clientStreamNode *, ClientHttpRequest *, HttpReply *, StoreIOBuffer)
Definition: Downloader.cc:191
Definition: HttpReply.h:25
Definition: RequestMethod.h:27
static HttpRequest * FromUrl(const SBuf &url, const MasterXaction::Pointer &, const HttpRequestMethod &method=Http::METHOD_GET)
Definition: HttpRequest.cc:517
static const size_type maxSize
Maximum size of a SBuf. By design it MUST be < MAX(size_type)/2. Currently 256Mb.
Definition: SBuf.h:102
Definition: StoreIOBuffer.h:16
struct StoreIOBuffer::@141 flags
Definition: client_side_reply.h:23
Definition: clientStream.h:76
clientStream_status_t clientStreamStatus(clientStreamNode *thisObject, ClientHttpRequest *http)
Definition: clientStream.cc:257
void clientStreamRead(clientStreamNode *thisObject, ClientHttpRequest *http, StoreIOBuffer readBuffer)
Definition: clientStream.cc:170
void clientStreamInit(dlink_list *list, CSR *func, CSD *rdetach, CSS *readstatus, ClientStreamData readdata, CSCB *callback, CSD *cdetach, ClientStreamData callbackdata, StoreIOBuffer tailBuffer)
Definition: clientStream.cc:112
void clientStreamDetach(clientStreamNode *thisObject, ClientHttpRequest *http)
Definition: clientStream.cc:192
AnyP::ProtocolVersion ProtocolVersion(unsigned int aMajor, unsigned int aMinor)
HTTP version label information.
Definition: ProtocolVersion.h:19
uint64_t size
Response header and body bytes written to the client connection.
Definition: client_side_request.h:156
Definition: parse.c:104