|
Squid Web Cache v8/master
|
Public Types | |
| enum | { BEGIN , SENT_USER , SENT_PASS , SENT_TYPE , SENT_MDTM , SENT_SIZE , SENT_EPRT , SENT_PORT , SENT_EPSV_ALL , SENT_EPSV_1 , SENT_EPSV_2 , SENT_PASV , SENT_CWD , SENT_LIST , SENT_NLST , SENT_REST , SENT_RETR , SENT_STOR , SENT_QUIT , READING_DATA , WRITING_DATA , SENT_MKDIR , SENT_FEAT , SENT_PWD , SENT_CDUP , SENT_DATA_REQUEST , SENT_COMMAND , END } |
| typedef CbcPointer< AsyncJob > | Pointer |
| typedef CbcPointer< BodyProducer > | Pointer |
| typedef CbcPointer< BodyConsumer > | Pointer |
Public Member Functions | |
| Gateway (FwdState *) | |
| ~Gateway () override | |
| void | start () override |
| called by AsyncStart; do not call directly | |
| Http::StatusCode | failedHttpStatus (err_type &error) override |
| int | restartable () |
| void | appendSuccessHeader () |
| void | hackShortcut (StateMethod *nextState) |
| void | unhack () |
| void | readStor () |
| void | parseListing () |
| bool | htmlifyListEntry (const char *line, PackableStream &) |
| void | completedListing (void) |
| void | listenForDataChannel (const Comm::ConnectionPointer &conn) |
| create a data channel acceptor and start listening. | |
| int | checkAuth (const HttpHeader *req_hdr) |
| void | checkUrlpath () |
| std::optional< SBuf > | decodedRequestUriPath () const |
| absolute request URI path after successful decoding of all pct-encoding sequences | |
| void | buildTitleUrl () |
| void | writeReplyBody (const char *, size_t len) |
| void | completeForwarding () override |
| void | processHeadResponse () |
| void | processReplyBody () override |
| void | setCurrentOffset (int64_t offset) |
| int64_t | getCurrentOffset () const |
| void | dataChannelConnected (const CommConnectCbParams &io) override |
| void | timeout (const CommTimeoutCbParams &io) override |
| read timeout handler | |
| void | ftpAcceptDataConnection (const CommAcceptCbParams &io) |
| SBuf | ftpRealm () |
| void | loginFailed (void) |
| void | haveParsedReplyHeaders () override |
| called when we have final (possibly adapted) reply headers; kids extend | |
| virtual bool | haveControlChannel (const char *caller_name) const |
| virtual void | failed (err_type error=ERR_NONE, int xerrno=0, ErrorState *ftperr=nullptr) |
| handle a fatal transaction error, closing the control connection | |
| void | maybeReadVirginBody () override |
| read response data from the network | |
| void | writeCommand (const char *buf) |
| bool | handlePasvReply (Ip::Address &remoteAddr) |
| bool | handleEpsvReply (Ip::Address &remoteAddr) |
| bool | sendEprt () |
| bool | sendPort () |
| bool | sendPassive () |
| void | connectDataChannel () |
| bool | openListenSocket () |
| void | switchTimeoutToDataChannel () |
| void | noteMoreBodyDataAvailable (BodyPipe::Pointer) override |
| void | noteBodyProductionEnded (BodyPipe::Pointer) override |
| void | noteBodyProducerAborted (BodyPipe::Pointer) override |
| virtual bool | abortOnData (const char *reason) |
| virtual HttpRequestPointer | originalRequest () |
| a hack to reach HttpStateData::orignal_request | |
| void | noteAdaptationAnswer (const Adaptation::Answer &answer) override |
| void | noteAdaptationAclCheckDone (Adaptation::ServiceGroupPointer group) override |
| void | noteMoreBodySpaceAvailable (BodyPipe::Pointer) override |
| void | noteBodyConsumerAborted (BodyPipe::Pointer) override |
| virtual bool | getMoreRequestBody (MemBuf &buf) |
| either fill buf with available [encoded] request body bytes or return false | |
| void | swanSong () override |
| bool | doneAll () const override |
| whether positive goal has been reached | |
| void | serverComplete () |
| void | markParsedVirginReplyAsWhole (const char *reasonWeAreSure) |
| bool | canBeCalled (AsyncCall &call) const |
| whether we can be called | |
| void | callStart (AsyncCall &call) |
| virtual void | callEnd () |
| called right after the called job method | |
| virtual void | callException (const std::exception &e) |
| called when the job throws during an async call | |
| void | handleStopRequest () |
| process external request to terminate now (i.e. during this async call) | |
| virtual void * | toCbdata ()=0 |
Static Public Member Functions | |
| static HttpReply * | ftpAuthRequired (HttpRequest *request, SBuf &realm, AccessLogEntry::Pointer &) |
| static void | Start (const Pointer &job) |
| static void | RegisterWithCacheManager () |
Public Attributes | |
| char | user [MAX_URL] |
| char | password [MAX_URL] |
| int | password_url |
| char * | reply_hdr |
| int | reply_hdr_state |
| String | clean_url |
| String | title_url |
| String | base_href |
| int | conn_att |
| int | login_att |
| time_t | mdtm |
| int64_t | theSize |
| wordlist * | pathcomps |
| char * | filepath |
| char * | dirpath |
| int64_t | restart_offset |
| char * | proxy_host |
| size_t | list_width |
| String | cwd_message |
| char * | old_filepath |
| char | typecode |
| MemBuf | listing |
| FTP directory listing in HTML format. | |
| GatewayFlags | flags |
| CtrlChannel | ctrl |
| FTP control channel state. | |
| DataChannel | data |
| FTP data channel state. | |
| enum Ftp::Client:: { ... } | ftp_state_t |
| int | state |
| char * | old_request |
| char * | old_reply |
| StoreEntry * | entry = nullptr |
| FwdState::Pointer | fwd |
| HttpRequestPointer | request |
| const InstanceId< AsyncJob > | id |
| job identifier | |
Static Public Attributes | |
| static PF | ftpDataWrite |
Protected Member Functions | |
| void | handleControlReply () override |
| void | dataClosed (const CommCloseCbParams &io) override |
| handler called by Comm when FTP data channel is closed unexpectedly | |
| void | closeServer () override |
| bool | doneWithServer () const override |
| const Comm::ConnectionPointer & | dataConnection () const override |
| void | abortAll (const char *reason) override |
| abnormal transaction termination; reason is for debugging only | |
| void | noteDelayAwareReadChance () override |
| void | ctrlClosed (const CommCloseCbParams &io) |
| handler called by Comm when FTP control channel is closed unexpectedly | |
| void | scheduleReadControlReply (int buffered_ok) |
| void | readControlReply (const CommIoCbParams &io) |
| void | writeCommandCallback (const CommIoCbParams &io) |
| void | dataRead (const CommIoCbParams &io) |
| void | dataComplete () |
| AsyncCall::Pointer | dataCloser () |
| creates a data channel Comm close callback | |
| void | initReadBuf () |
| void | sentRequestBody (const CommIoCbParams &io) override |
| void | doneSendingRequestBody () override |
| bool | startRequestBodyFlow () |
| void | handleMoreRequestBodyAvailable () |
| void | handleRequestBodyProductionEnded () |
| void | sendMoreRequestBody () |
| bool | abortOnBadEntry (const char *abortReason) |
| Entry-dependent callbacks use this check to quit if the entry went bad. | |
| bool | blockCaching () |
| whether to prevent caching of an otherwise cachable response | |
| void | startAdaptation (const Adaptation::ServiceGroupPointer &group, HttpRequest *cause) |
| Initiate an asynchronous adaptation transaction which will call us back. | |
| void | adaptVirginReplyBody (const char *buf, ssize_t len) |
| void | cleanAdaptation () |
| virtual bool | doneWithAdaptation () const |
| void | handleMoreAdaptedBodyAvailable () |
| void | handleAdaptedBodyProductionEnded () |
| void | handleAdaptedBodyProducerAborted () |
| void | handleAdaptedHeader (Http::Message *msg) |
| void | handleAdaptationCompleted () |
| void | handleAdaptationBlocked (const Adaptation::Answer &answer) |
| void | handleAdaptationAborted (bool bypassable=false) |
| bool | handledEarlyAdaptationAbort () |
| void | resumeBodyStorage () |
| called by StoreEntry when it has more buffer space available | |
| void | checkAdaptationWithBodyCompletion () |
| const HttpReply * | virginReply () const |
| HttpReply * | virginReply () |
| HttpReply * | setVirginReply (HttpReply *r) |
| HttpReply * | finalReply () |
| HttpReply * | setFinalReply (HttpReply *r) |
| void | adaptOrFinalizeReply () |
| void | addVirginReplyBody (const char *buf, ssize_t len) |
| void | storeReplyBody (const char *buf, ssize_t len) |
| size_t | calcBufferSpaceToReserve (const size_t space, const size_t wantSpace) const |
| determine how much space the buffer needs to reserve | |
| void | adjustBodyBytesRead (const int64_t delta) |
| initializes bodyBytesRead stats if needed and applies delta | |
| void | delayRead () |
| CbcPointer< Initiate > | initiateAdaptation (Initiate *x) |
| < starts freshly created initiate and returns a safe pointer to it | |
| void | clearAdaptation (CbcPointer< Initiate > &x) |
| clears the pointer (does not call announceInitiatorAbort) | |
| void | announceInitiatorAbort (CbcPointer< Initiate > &x) |
| inform the transaction about abnormal termination and clear the pointer | |
| bool | initiated (const CbcPointer< AsyncJob > &job) const |
| Must(initiated(initiate)) instead of Must(initiate.set()), for clarity. | |
| void | deleteThis (const char *aReason) |
| void | mustStop (const char *aReason) |
| bool | done () const |
| the job is destroyed in callEnd() when done() | |
| virtual const char * | status () const |
| internal cleanup; do not call directly | |
| void | stopProducingFor (RefCount< BodyPipe > &, bool atEof) |
| void | stopConsumingFrom (RefCount< BodyPipe > &) |
Static Protected Member Functions | |
| static void | ReportAllJobs (StoreEntry *) |
| writes a cache manager report about all jobs existing in this worker | |
Private Member Functions | |
| CBDATA_CHILD (Gateway) | |
| bool | mayReadVirginReplyBody () const override |
| whether we may receive more virgin response body bytes | |
| void | handleRequestBodyProducerAborted () override |
| void | loginParser (const SBuf &login, bool escaped) |
| CBDATA_INTERMEDIATE () | |
| bool | parseControlReply (size_t &bytesUsed) |
| void | serverComplete2 () |
| void | sendBodyIsTooLargeError () |
| void | maybePurgeOthers () |
| virtual void | finalizedInCbdataChild ()=0 |
| hack: ensure CBDATA_CHILD() after a toCbdata()-defining CBDATA_INTERMEDIATE() | |
Private Attributes | |
| bool | shortenReadTimeout |
| bool | completed = false |
| HttpReply * | theVirginReply = nullptr |
| HttpReply * | theFinalReply = nullptr |
FTP Gateway: An FTP client that takes an HTTP request with an ftp:// URI, converts it into one or more FTP commands, and then converts one or more FTP responses into the final HTTP response.
Definition at line 95 of file FtpGateway.cc.
|
inherited |
Definition at line 34 of file AsyncJob.h.
|
inherited |
Definition at line 25 of file BodyPipe.h.
|
inherited |
Definition at line 45 of file BodyPipe.h.
|
inherited |
Definition at line 145 of file FtpClient.h.
| Ftp::Gateway::Gateway | ( | FwdState * | fwdState | ) |
Definition at line 330 of file FtpGateway.cc.
References Config, debugs, Client::entry, flags, SquidConfig::Ftp, Ftp::Client::initReadBuf(), HttpRequest::method, Http::METHOD_PUT, SquidConfig::passive, password, Ftp::GatewayFlags::pasv_failed, Ftp::GatewayFlags::pasv_supported, Ftp::GatewayFlags::put, Client::request, Ftp::GatewayFlags::rest_supported, StoreEntry::url(), and user.
|
override |
Definition at line 366 of file FtpGateway.cc.
References DBG_IMPORTANT, debugs, Comm::IsConnOpen(), MEM_8K_BUF, memFree(), wordlistDestroy(), and xfree.
|
overrideprotectedvirtualinherited |
|
protectedinherited |
Definition at line 262 of file Client.cc.
References Client::abortOnData(), debugs, Client::entry, and StoreEntry::isAccepting().
Referenced by Client::handleAdaptationAborted(), Client::handleAdaptationBlocked(), Client::handleAdaptedBodyProducerAborted(), Client::handleAdaptedBodyProductionEnded(), Client::handleAdaptedHeader(), Client::handleMoreAdaptedBodyAvailable(), Client::noteAdaptationAclCheckDone(), and Client::resumeBodyStorage().
|
virtualinherited |
abnormal data transfer termination
| true | the transaction will be terminated (abortAll called) |
| false | the transaction will survive |
Reimplemented in Ftp::Relay.
Definition at line 315 of file Client.cc.
References Client::abortAll().
Referenced by Client::abortOnBadEntry(), Client::handleAdaptationBlocked(), Client::sendBodyIsTooLargeError(), and Client::sentRequestBody().
|
protectedinherited |
Definition at line 1009 of file Client.cc.
References Client::adaptationAccessCheckPending, FwdState::al, debugs, Client::fwd, Adaptation::methodRespmod, Client::originalRequest(), Adaptation::pointPreCache, Client::setFinalReply(), Adaptation::AccessCheck::Start(), and Client::virginReply().
Referenced by HttpStateData::processReply().
|
protectedinherited |
Definition at line 632 of file Client.cc.
References MemBuf::append(), assert, MemBuf::consume(), MemBuf::content(), MemBuf::contentSize(), debugs, MemBuf::init(), BodyPipe::putMoreData(), Client::responseBodyBuffer, SQUID_TCP_SO_RCVBUF, Client::startedAdaptation, and Client::virginBodyDestination.
Referenced by Client::addVirginReplyBody().
|
protectedinherited |
Definition at line 1054 of file Client.cc.
References Client::adaptationAccessCheckPending, Client::adaptVirginReplyBody(), Client::adjustBodyBytesRead(), assert, Client::startedAdaptation, and Client::storeReplyBody().
Referenced by HttpStateData::decodeAndWriteReplyBody(), Client::noteMoreBodySpaceAvailable(), and HttpStateData::writeReplyBody().
|
protectedinherited |
Definition at line 1027 of file Client.cc.
References HierarchyLogEntry::bodyBytesRead, HttpRequest::hier, Must, and Client::originalRequest().
Referenced by Client::addVirginReplyBody().
|
protectedinherited |
Definition at line 38 of file Initiator.cc.
References CallJobHere.
Referenced by ClientHttpRequest::~ClientHttpRequest(), and Client::cleanAdaptation().
| void Ftp::Gateway::appendSuccessHeader | ( | ) |
Definition at line 2500 of file FtpGateway.cc.
References assert, SBuf::c_str(), Http::CONTENT_ENCODING, DBG_CRITICAL, debugs, Http::Message::header, httpHeaderAddContRange(), HttpHdrRangeSpec::length, mimeGetContentEncoding(), mimeGetContentType(), MYNAME, SBuf::npos, HttpHdrRangeSpec::offset, HttpHeader::putStr(), SBuf::rfind(), Http::scOkay, Http::scPartialContent, HttpReply::setHeaders(), Http::Message::sources, Http::Message::srcFtp, and SBuf::substr().
|
protectedinherited |
Definition at line 556 of file Client.cc.
References SquidConfig::accessList, FwdState::al, Acl::Answer::allowed(), Config, debugs, Client::entry, ACLChecklist::fastCheck(), MemObject::freshestReply(), Client::fwd, StoreEntry::mem(), Client::originalRequest(), SquidConfig::storeMiss, ACLFilledChecklist::updateAle(), and ACLFilledChecklist::updateReply().
Referenced by Client::setFinalReply().
| void Ftp::Gateway::buildTitleUrl | ( | ) |
Definition at line 1120 of file FtpGateway.cc.
References SBuf::append(), AnyP::PROTO_FTP, and rfc1738_escape_part.
|
protectedinherited |
Definition at line 1079 of file Client.cc.
References BodyPipe::buf(), debugs, SBuf::maxSize, min(), MemBuf::potentialSpaceSize(), Client::responseBodyBuffer, and Client::virginBodyDestination.
Referenced by HttpStateData::maybeMakeSpaceAvailable().
|
virtualinherited |
called right after the called job method
Reimplemented in Adaptation::Icap::Xaction.
Definition at line 152 of file AsyncJob.cc.
References assert, AsyncCall::debugLevel, debugs, AsyncCall::debugSection, AsyncJob::done(), AsyncJob::inCall, AsyncJob::started_, AsyncJob::status(), AsyncJob::swanSang_, AsyncJob::swanSong(), and AsyncJob::typeName.
Referenced by Adaptation::Icap::Xaction::callEnd(), and AsyncJob::deleteThis().
|
virtualinherited |
Reimplemented in ConnStateData, ClientHttpRequest, Rock::Rebuild, Adaptation::Icap::ModXact, Adaptation::Icap::ServiceRep, Adaptation::Icap::Xaction, Ipc::Forwarder, Ipc::Inquirer, and Ftp::Server.
Definition at line 143 of file AsyncJob.cc.
References cbdataReferenceValid(), debugs, Must, AsyncJob::mustStop(), and CbdataParent::toCbdata().
Referenced by ConnStateData::callException(), Adaptation::Icap::Xaction::callException(), Ipc::Forwarder::callException(), Ipc::Inquirer::callException(), and Ftp::Server::callException().
|
inherited |
called just before the called method
Definition at line 130 of file AsyncJob.cc.
References cbdataReferenceValid(), AsyncCall::debugLevel, debugs, AsyncCall::debugSection, AsyncJob::inCall, Must, AsyncJob::status(), CbdataParent::toCbdata(), and AsyncJob::typeName.
|
inherited |
Definition at line 117 of file AsyncJob.cc.
References AsyncCall::cancel(), debugs, and AsyncJob::inCall.
|
private |
|
privateinherited |
|
protectedinherited |
Reacts to adaptedBodySource-related changes. May end adapted body consumption, adaptation as a whole, or forwarding. Safe to call multiple times, including calls made after the end of adaptation.
Definition at line 831 of file Client.cc.
References Client::adaptedBodySource, Client::adaptedReplyAborted, debugs, Client::doneWithAdaptation(), BodyPipe::exhausted(), Client::handleAdaptationCompleted(), Client::receivedWholeAdaptedReply, Client::startedAdaptation, BodyPipe::status(), and BodyConsumer::stopConsumingFrom().
Referenced by Client::handleAdaptedBodyProducerAborted(), Client::handleAdaptedBodyProductionEnded(), Client::handleAdaptedHeader(), and Client::resumeBodyStorage().
| int Ftp::Gateway::checkAuth | ( | const HttpHeader * | req_hdr | ) |
Locates the FTP user:password login.
Highest to lowest priority:
Special Case: A username-only may be provided in the URL and password in the HTTP headers.
TODO: we might be able to do something about locating username from other sources: ie, external ACL user=* tag
| 1 | if we have everything needed to complete this request. |
| 0 | if something is missing. |
Definition at line 1035 of file FtpGateway.cc.
References SquidConfig::anon_user, Assure, Http::AUTHORIZATION, Config, SquidConfig::Ftp, HttpHeader::getAuthToken(), MAX_URL, null_string, and xstrncpy().
| void Ftp::Gateway::checkUrlpath | ( | ) |
Definition at line 1080 of file FtpGateway.cc.
References SBuf::length(), SBuf::npos, and xtoupper.
|
protectedinherited |
Definition at line 607 of file Client.cc.
References Client::adaptationAccessCheckPending, Client::adaptedBodySource, Client::adaptedHeadSource, Adaptation::Initiator::announceInitiatorAbort(), assert, debugs, Client::doneWithAdaptation(), BodyConsumer::stopConsumingFrom(), BodyProducer::stopProducingFor(), and Client::virginBodyDestination.
Referenced by Client::handleAdaptationCompleted(), and Client::swanSong().
|
protectedinherited |
Definition at line 32 of file Initiator.cc.
References CbcPointer< Cbc >::clear().
Referenced by ClientHttpRequest::handleAdaptedHeader(), ClientHttpRequest::noteAdaptationAnswer(), and Client::noteAdaptationAnswer().
|
overrideprotectedvirtualinherited |
Close the FTP server connection(s). Used by serverComplete().
Implements Client.
Definition at line 234 of file FtpClient.cc.
References debugs, and Comm::IsConnOpen().
| void Ftp::Gateway::completedListing | ( | void | ) |
Generate the HTTP headers and template fluff around an FTP directory listing display.
Definition at line 2223 of file FtpGateway.cc.
References assert, ErrorState::BuildHttpReply(), ErrorState::cwd_msg, ERR_DIR_LISTING, ErrorState::ftp, ErrorState::listing, safe_free, Http::scOkay, ErrorState::server_msg, and xstrdup.
Referenced by ftpReadTransferDone().
|
overridevirtual |
A hack to ensure we do not double-complete on the forward entry.
TODO: Ftp::Gateway logic should probably be rewritten to avoid double-completion or FwdState should be rewritten to allow it.
Reimplemented from Client.
Definition at line 2651 of file FtpGateway.cc.
References Client::completeForwarding(), and debugs.
|
inherited |
Definition at line 763 of file FtpClient.cc.
References COMM_TRANSPARENT, Config, SquidConfig::connect, Ftp::Client::dataChannelConnected(), debugs, Comm::Connection::flags, Comm::IsConnOpen(), JobCallback, Comm::Connection::local, Comm::Connection::nfmark, Ip::Address::port(), Comm::Connection::remote, safe_free, Comm::Connection::setAddrs(), SquidConfig::Timeout, Comm::Connection::tos, and xstrdup.
Referenced by ftpReadEPSV(), and ftpReadPasv().
|
protectedinherited |
Definition at line 880 of file FtpClient.cc.
References debugs.
Referenced by Ftp::Client::Client().
|
overridevirtual |
Implements Ftp::Client.
Definition at line 1733 of file FtpGateway.cc.
References CommCommonCbParams::conn, debugs, CommCommonCbParams::flag, ftpRestOrList, ftpSendPassive, MYNAME, Comm::OK, Comm::TIMEOUT, and CommCommonCbParams::xerrno.
|
overrideprotectedvirtual |
Reimplemented from Ftp::Client.
Definition at line 318 of file FtpGateway.cc.
References Ftp::Client::dataClosed(), ERR_FTP_FAILURE, and Ftp::Client::failed().
|
protectedinherited |
Definition at line 803 of file FtpClient.cc.
References Ftp::Client::dataClosed(), and JobCallback.
|
protectedinherited |
Close data channel, if any, to conserve resources while we wait.
Definition at line 1029 of file FtpClient.cc.
References debugs.
Referenced by Ftp::Relay::HandleStoreAbort().
|
overrideprotectedvirtualinherited |
Implements Client.
Definition at line 903 of file FtpClient.cc.
|
protectedinherited |
Definition at line 960 of file FtpClient.cc.
References StatCounters::all, assert, DelayId::bytesIn(), DBG_IMPORTANT, debugs, EBIT_TEST, ENTRY_ABORTED, Comm::ERR_CLOSING, ERR_READ_ERROR, CommCommonCbParams::fd, CommCommonCbParams::flag, IoStats::Ftp, StatCounters::ftp, ignoreErrno(), IOStats, StatCounters::kbytes_in, Comm::OK, IoStats::read_hist, IoStats::reads, StatCounters::server, CommIoCbParams::size, statCounter, CommCommonCbParams::xerrno, and xstrerr().
Referenced by Ftp::Client::maybeReadVirginBody().
| std::optional< SBuf > Ftp::Gateway::decodedRequestUriPath | ( | ) | const |
Definition at line 2309 of file FtpGateway.cc.
References AnyP::Uri::Decode().
Referenced by ftpFail(), and ftpTrySlashHack().
|
protectedinherited |
Defer reading until it is likely to become possible. Eventually, noteDelayAwareReadChance() will be called.
Definition at line 1042 of file Client.cc.
References Assure, asyncCall(), MemObject::delayRead(), Client::entry, StoreEntry::mem(), Client::noteDelayAwareReadChance(), and Client::waitingForDelayAwareReadChance.
Referenced by HttpStateData::readReply().
|
protectedinherited |
Definition at line 65 of file AsyncJob.cc.
References asyncCall(), AsyncJob::callEnd(), debugs, AsyncJob::deleteThis(), AsyncJob::inCall, JobMemFun(), Must, AsyncJob::stopReason, and AsyncJob::typeName.
Referenced by ConnStateData::connStateClosed(), and AsyncJob::deleteThis().
|
protectedinherited |
Definition at line 106 of file AsyncJob.cc.
References AsyncJob::doneAll(), and AsyncJob::stopReason.
Referenced by AsyncJob::callEnd(), HappyConnOpener::checkForNewConnection(), Downloader::downloadFinished(), and HappyConnOpener::maybeOpenPrimeConnection().
|
overridevirtualinherited |
Reimplemented from AsyncJob.
Definition at line 203 of file Client.cc.
References AsyncJob::doneAll(), Client::doneWithAdaptation(), and Client::doneWithServer().
|
overrideprotectedvirtualinherited |
called after we wrote the last byte of the request body
Implements Client.
Definition at line 1092 of file FtpClient.cc.
References debugs, and Ftp::Client::doneSendingRequestBody().
Referenced by Ftp::Client::doneSendingRequestBody().
|
protectedvirtualinherited |
did we end ICAP communication?
Definition at line 624 of file Client.cc.
References Client::adaptationAccessCheckPending, Client::adaptedBodySource, Client::adaptedHeadSource, and Client::virginBodyDestination.
Referenced by Client::checkAdaptationWithBodyCompletion(), Client::cleanAdaptation(), Client::completeForwarding(), Client::doneAll(), Client::handleAdaptedHeader(), Client::noteBodyConsumerAborted(), and Client::serverComplete2().
|
overrideprotectedvirtualinherited |
Did we close all FTP server connection(s)?
| true | Both server control and data channels are closed. And not waiting for a new data connection to open. |
| false | Either control channel or data is still active. |
Implements Client.
Definition at line 257 of file FtpClient.cc.
References Comm::IsConnOpen().
|
virtualinherited |
Reimplemented in Ftp::Relay.
Definition at line 263 of file FtpClient.cc.
References debugs, error(), ErrorState::ftp, ErrorState::httpStatus, SysErrorDetail::NewIfAny(), ErrorState::reply, ErrorState::request, ErrorState::server_msg, ErrorState::type, ErrorState::xerrno, and xstrdup.
Referenced by dataClosed(), Ftp::Relay::failed(), ftpFail(), ftpReadTransferDone(), and ftpWriteTransferDone().
|
overridevirtual |
Reimplemented from Ftp::Client.
Definition at line 2421 of file FtpGateway.cc.
References ERR_FTP_FORBIDDEN, ERR_FTP_NOT_FOUND, ERR_FTP_UNAVAILABLE, ERR_NONE, error(), Ftp::Client::failedHttpStatus(), Http::scForbidden, Http::scNotFound, Http::scServiceUnavailable, and Http::scUnauthorized.
Referenced by ftpFail().
|
privatepure virtualinherited |
|
protectedinherited |
Definition at line 129 of file Client.cc.
References assert, and Client::theFinalReply.
Referenced by HttpStateData::haveParsedReplyHeaders(), and HttpStateData::reusableReply().
| void Ftp::Gateway::ftpAcceptDataConnection | ( | const CommAcceptCbParams & | io | ) |
"read" handler to accept FTP data connections.
| io | comm accept(2) callback parameters |
On Comm::OK start using the accepted data socket and discard the temporary listen socket.
Definition at line 1884 of file FtpGateway.cc.
References assert, Comm::Connection::close(), Config, CommCommonCbParams::conn, DBG_IMPORTANT, debugs, EBIT_TEST, ENTRY_ABORTED, fd_table, CommCommonCbParams::flag, SquidConfig::Ftp, ftpFail, Comm::IsConnOpen(), MYNAME, Comm::OK, Comm::Connection::remote, SquidConfig::sanitycheck, CommCommonCbParams::xerrno, and xstrerr().
Referenced by listenForDataChannel().
|
static |
Definition at line 2598 of file FtpGateway.cc.
References ErrorState::BuildHttpReply(), SBuf::c_str(), ERR_CACHE_ACCESS_DENIED, Http::Message::header, HttpHeader::putAuth(), and Http::scUnauthorized.
| SBuf Ftp::Gateway::ftpRealm | ( | ) |
Definition at line 1270 of file FtpGateway.cc.
References SBuf::append(), and SBuf::appendf().
|
inline |
Definition at line 152 of file FtpGateway.cc.
References Client::currentOffset.
|
virtualinherited |
Reimplemented in HttpStateData.
Definition at line 442 of file Client.cc.
References BodyPipe::getMoreData(), Must, and Client::requestBodySource.
Referenced by HttpStateData::getMoreRequestBody(), and Client::sendMoreRequestBody().
| void Ftp::Gateway::hackShortcut | ( | StateMethod * | nextState | ) |
Definition at line 2351 of file FtpGateway.cc.
References debugs, MYNAME, and xstrdup.
Referenced by ftpFail(), and ftpReadRetr().
|
protectedinherited |
Definition at line 897 of file Client.cc.
References Client::abortAll(), Client::abortOnBadEntry(), debugs, Client::entry, Client::handledEarlyAdaptationAbort(), and StoreEntry::isEmpty().
Referenced by Client::noteAdaptationAnswer().
|
protectedinherited |
Definition at line 936 of file Client.cc.
References Client::abortAll(), Client::abortOnBadEntry(), Client::abortOnData(), FwdState::al, Adaptation::Answer::blockedToChecklistAnswer(), debugs, HttpRequest::detailError(), FwdState::dontRetry(), Client::entry, ERR_ACCESS_DENIED, ERR_ICAP_FAILURE, ERR_NONE, FwdState::fail(), FindDenyInfoPage(), Client::fwd, RefCount< C >::getRaw(), StoreEntry::isEmpty(), MakeNamedErrorDetail(), Client::request, and Http::scForbidden.
Referenced by Client::noteAdaptationAnswer().
|
protectedinherited |
Definition at line 878 of file Client.cc.
References Client::cleanAdaptation(), Client::closeServer(), Client::completeForwarding(), debugs, and Client::mayReadVirginReplyBody().
Referenced by Client::checkAdaptationWithBodyCompletion(), Client::handleAdaptedHeader(), and Client::noteBodyConsumerAborted().
|
protectedinherited |
Definition at line 857 of file Client.cc.
References Client::abortOnBadEntry(), Client::adaptedBodySource, Client::adaptedReplyAborted, Assure, Client::checkAdaptationWithBodyCompletion(), debugs, BodyPipe::exhausted(), Client::handledEarlyAdaptationAbort(), Must, and Client::receivedWholeAdaptedReply.
Referenced by Client::noteBodyProducerAborted().
|
protectedinherited |
Definition at line 819 of file Client.cc.
References Client::abortOnBadEntry(), Client::adaptedReplyAborted, Assure, Client::checkAdaptationWithBodyCompletion(), and Client::receivedWholeAdaptedReply.
Referenced by Client::noteBodyProductionEnded().
|
protectedinherited |
Definition at line 720 of file Client.cc.
References Client::abortOnBadEntry(), Client::adaptedBodySource, Client::adaptedReplyAborted, assert, Assure, Http::Message::body_pipe, Client::checkAdaptationWithBodyCompletion(), debugs, Client::doneWithAdaptation(), BodyPipe::expectNoConsumption(), Client::handleAdaptationCompleted(), Client::receivedWholeAdaptedReply, BodyPipe::setConsumerIfNotLate(), and Client::setFinalReply().
Referenced by Client::noteAdaptationAnswer().
|
overrideprotectedvirtual |
Reimplemented from Ftp::Client.
Definition at line 1175 of file FtpGateway.cc.
References FTP_SM_FUNCS, and Ftp::Client::handleControlReply().
|
protectedinherited |
If the store entry is still empty, fully handles adaptation abort, returning true. Otherwise just updates the request error detail and returns false.
Definition at line 913 of file Client.cc.
References Client::abortAll(), FwdState::al, debugs, HttpRequest::detailError(), FwdState::dontRetry(), Client::entry, ERR_ICAP_FAILURE, FwdState::fail(), Client::fwd, RefCount< C >::getRaw(), StoreEntry::isEmpty(), MakeNamedErrorDetail(), Client::request, and Http::scInternalServerError.
Referenced by Client::handleAdaptationAborted(), and Client::handleAdaptedBodyProducerAborted().
|
inherited |
Definition at line 492 of file FtpClient.cc.
References Config, DBG_IMPORTANT, debugs, ERR_FTP_FAILURE, SquidConfig::Ftp, Comm::IsConnOpen(), port, Ip::Address::port(), and SquidConfig::sanitycheck.
Referenced by ftpReadEPSV().
|
protectedinherited |
Definition at line 772 of file Client.cc.
References Client::abortOnBadEntry(), Client::adaptedBodySource, assert, asyncCall(), BodyPipeCheckout::buf, BodyPipe::buf(), StoreEntry::bytesWanted(), BodyPipeCheckout::checkIn(), MemBuf::consume(), BodyPipe::consumedSize(), MemBuf::contentSize(), Client::currentOffset, debugs, StoreEntry::deferProducer(), Client::entry, StoreIOBuffer::length, Client::resumeBodyStorage(), and StoreEntry::write().
Referenced by Client::noteMoreBodyDataAvailable(), and Client::resumeBodyStorage().
|
protectedinherited |
Definition at line 323 of file Client.cc.
References debugs, Client::requestSender, and Client::sendMoreRequestBody().
Referenced by Client::noteMoreBodyDataAvailable().
|
inherited |
extracts remoteAddr from PASV response, validates it, sets data address details, and returns true on success
Definition at line 456 of file FtpClient.cc.
References Config, DBG_IMPORTANT, debugs, fd_table, SquidConfig::Ftp, Comm::IsConnOpen(), Ftp::ParseIpPort(), and SquidConfig::sanitycheck.
Referenced by ftpReadPasv().
|
overrideprivatevirtual |
Implements Client.
Definition at line 2262 of file FtpGateway.cc.
References debugs, ERR_READ_ERROR, and Client::handleRequestBodyProducerAborted().
|
protectedinherited |
Definition at line 333 of file Client.cc.
References debugs, Client::doneSendingRequestBody(), Client::receivedWholeRequestBody, and Client::requestSender.
Referenced by Client::noteBodyProductionEnded().
|
inlineinherited |
Definition at line 73 of file AsyncJob.h.
References AsyncJob::mustStop().
|
virtual |
Have we lost the FTP server control channel?
| true | The server control channel is available. |
| false | The server control channel is not available. |
Definition at line 2671 of file FtpGateway.cc.
References DBG_IMPORTANT, debugs, and Comm::IsConnOpen().
Referenced by ftpSendCwd(), ftpSendList(), ftpSendMdtm(), ftpSendMkdir(), ftpSendNlst(), ftpSendPass(), ftpSendPassive(), ftpSendPORT(), ftpSendQuit(), ftpSendRest(), ftpSendRetr(), ftpSendSize(), ftpSendStor(), ftpSendType(), and ftpSendUser().
|
overridevirtual |
called when got final headers
Reimplemented from Client.
Definition at line 2581 of file FtpGateway.cc.
References Client::haveParsedReplyHeaders(), StoreEntry::makePublic(), StoreEntry::release(), and StoreEntry::timestampsSet().
| bool Ftp::Gateway::htmlifyListEntry | ( | const char * | line, |
| PackableStream & | html | ||
| ) |
Definition at line 768 of file FtpGateway.cc.
References SBuf::append(), SBuf::appendf(), SBuf::c_str(), ftpListParts::date, debugs, ftpListParseParts(), ftpListPartsFree(), html_quote(), ftpListParts::link, mimeGetDownloadOption(), mimeGetIconURL(), mimeGetViewOption(), ftpListParts::name, PRId64, rfc1738_escape, rfc1738_escape_part, ftpListParts::showname, ftpListParts::size, size, SQUIDSBUFPH, SQUIDSBUFPRINT, text, ftpListParts::type, xisspace, and xstrdup.
|
protectedinherited |
Definition at line 23 of file Initiator.cc.
References Adaptation::Initiate::initiator().
Referenced by ClientHttpRequest::startAdaptation(), and Client::startAdaptation().
|
inlineprotectedinherited |
Definition at line 52 of file Initiator.h.
References CbcPointer< Cbc >::set().
Referenced by ClientHttpRequest::startAdaptation(), and Client::startAdaptation().
|
protectedinherited |
Definition at line 222 of file FtpClient.cc.
References MemBuf::init(), and SQUID_TCP_SO_RCVBUF.
Referenced by Gateway().
| void Ftp::Gateway::listenForDataChannel | ( | const Comm::ConnectionPointer & | conn | ) |
Definition at line 451 of file FtpGateway.cc.
References assert, comm_open_listener(), DBG_CRITICAL, debugs, Comm::Connection::fd, Comm::Connection::flags, ftpAcceptDataConnection(), Comm::IsConnOpen(), JobCallback, Comm::Connection::local, Comm::Connection::nfmark, AsyncJob::Start(), and Comm::Connection::tos.
Referenced by ftpOpenListenSocket(), ftpReadList(), and ftpReadRetr().
| void Ftp::Gateway::loginFailed | ( | void | ) |
Translate FTP login failure into HTTP error this is an attempt to get the 407 message to show up outside Squid. its NOT a general failure. But a correct FTP response type.
Definition at line 1226 of file FtpGateway.cc.
References ErrorState::BuildHttpReply(), SBuf::c_str(), ERR_FTP_FORBIDDEN, ERR_FTP_UNAVAILABLE, ERR_NONE, ftpFail, Http::Message::header, HttpHeader::putAuth(), Http::scForbidden, Http::scServiceUnavailable, and Http::scUnauthorized.
Referenced by ftpReadPass(), and ftpReadUser().
|
private |
Parse a possible login username:password pair. Produces filled member variables user, password, password_url if anything found.
| login | a decoded Basic authentication credential token or URI user-info token |
| escaped | whether to URL-decode the token after extracting user and password |
Definition at line 399 of file FtpGateway.cc.
References SBuf::copy(), debugs, SBuf::find(), SBuf::isEmpty(), SBuf::length(), SBuf::npos, rfc1738_unescape(), and SBuf::substr().
|
inherited |
remember that the received virgin reply was parsed in its entirety, including its body (if any)
Definition at line 158 of file Client.cc.
References assert, debugs, and Client::markedParsedVirginReplyAsWhole.
Referenced by HttpStateData::decodeAndWriteReplyBody(), ftpReadTransferDone(), ftpWriteTransferDone(), and HttpStateData::writeReplyBody().
|
privateinherited |
Definition at line 520 of file Client.cc.
References SBuf::c_str(), Http::CONTENT_LOCATION, debugs, HttpRequest::effectiveRequestUri(), RefCount< C >::getRaw(), Http::LOCATION, HttpRequest::method, purgeEntriesByHeader(), purgeEntriesByUrl(), HttpRequestMethod::purgesOthers(), Client::request, HttpReply::sline, Http::StatusLine::status(), and Client::theFinalReply.
Referenced by Client::haveParsedReplyHeaders().
|
overridevirtualinherited |
Implements Client.
Definition at line 918 of file FtpClient.cc.
References comm_read(), commSetConnTimeout(), Config, Ftp::Client::dataRead(), debugs, fd_table, Comm::IsConnOpen(), JobCallback, SquidConfig::read, Ftp::Client::timeout(), and SquidConfig::Timeout.
Referenced by ftpReadList(), and ftpReadRetr().
|
overrideprivatevirtual |
Implements Client.
Definition at line 2687 of file FtpGateway.cc.
|
protectedinherited |
Definition at line 85 of file AsyncJob.cc.
References debugs, AsyncJob::inCall, Must, AsyncJob::stopReason, and AsyncJob::typeName.
Referenced by HttpStateData::abortAll(), AsyncJob::callException(), HttpStateData::continueAfterParsingHeader(), HttpStateData::drop1xx(), AsyncJob::handleStopRequest(), HttpStateData::httpStateConnClosed(), HttpStateData::httpTimeout(), HttpStateData::proceedAfter1xx(), ConnStateData::proxyProtocolError(), HttpStateData::readReply(), HttpStateData::start(), and HttpStateData::wroteLast().
|
overridevirtualinherited |
AccessCheck calls this back with a possibly nil service group to signal whether adaptation is needed and where it should start.
Reimplemented from Adaptation::Initiator.
Definition at line 970 of file Client.cc.
References Client::abortOnBadEntry(), Client::adaptationAccessCheckPending, debugs, Client::originalRequest(), Client::processReplyBody(), Client::request, Client::sendBodyIsTooLargeError(), Client::setFinalReply(), Client::startAdaptation(), and Client::virginReply().
|
overridevirtualinherited |
called with the initial adaptation decision (adapt, block, error); virgin and/or adapted body transmission may continue after this
Implements Adaptation::Initiator.
Definition at line 700 of file Client.cc.
References Client::adaptedHeadSource, Adaptation::Answer::akBlock, Adaptation::Answer::akError, Adaptation::Answer::akForward, Adaptation::Initiator::clearAdaptation(), Adaptation::Answer::final, RefCount< C >::getRaw(), Client::handleAdaptationAborted(), Client::handleAdaptationBlocked(), Client::handleAdaptedHeader(), Adaptation::Answer::kind, and Adaptation::Answer::message.
|
overridevirtualinherited |
Implements BodyProducer.
Definition at line 688 of file Client.cc.
References Client::doneWithAdaptation(), Client::handleAdaptationCompleted(), BodyProducer::stopProducingFor(), and Client::virginBodyDestination.
|
overridevirtualinherited |
Implements BodyConsumer.
Definition at line 302 of file Client.cc.
References Client::adaptedBodySource, Client::handleAdaptedBodyProducerAborted(), Client::handleRequestBodyProducerAborted(), and Client::requestBodySource.
|
overridevirtualinherited |
Implements BodyConsumer.
Definition at line 288 of file Client.cc.
References Client::adaptedBodySource, Client::handleAdaptedBodyProductionEnded(), Client::handleRequestBodyProductionEnded(), and Client::requestBodySource.
|
overrideprotectedvirtualinherited |
Called when a previously delayed dataConnection() read may be possible.
Implements Client.
Definition at line 909 of file FtpClient.cc.
|
overridevirtualinherited |
Implements BodyConsumer.
Definition at line 274 of file Client.cc.
References Client::adaptedBodySource, Client::handleMoreAdaptedBodyAvailable(), Client::handleMoreRequestBodyAvailable(), and Client::requestBodySource.
|
overridevirtualinherited |
Implements BodyProducer.
Definition at line 674 of file Client.cc.
References Client::addVirginReplyBody(), Client::completed, Client::maybeReadVirginBody(), Client::responseBodyBuffer, and Client::serverComplete2().
|
inherited |
Definition at line 796 of file FtpClient.cc.
|
virtualinherited |
Definition at line 573 of file Client.cc.
References Client::request.
Referenced by Client::adaptOrFinalizeReply(), Client::adjustBodyBytesRead(), Client::blockCaching(), HttpStateData::finishingBrokenPost(), HttpStateData::handle1xx(), Client::noteAdaptationAclCheckDone(), and Client::startRequestBodyFlow().
|
privateinherited |
Parses FTP server control response into ctrl structure fields, setting bytesUsed and returning true on success.
Definition at line 1106 of file FtpClient.cc.
References assert, Ftp::crlf, debugs, head, wordlist::key, wordlist::next, safe_free, wordlistDestroy(), xmalloc, xstrdup, and xstrncpy().
| void Ftp::Gateway::parseListing | ( | ) |
Definition at line 884 of file FtpGateway.cc.
References MemBuf::content(), MemBuf::contentSize(), Ftp::crlf, debugs, MemBuf::init(), MEM_4K_BUF, memAllocate(), memFree(), rfc1738_do_escape(), xfree, xmalloc, and xstrncpy().
| void Ftp::Gateway::processHeadResponse | ( | ) |
Definition at line 1691 of file FtpGateway.cc.
References debugs, EBIT_TEST, ENTRY_ABORTED, and ftpSendQuit.
Referenced by ftpSendPassive().
|
overridevirtual |
Implements Client.
Definition at line 968 of file FtpGateway.cc.
References debugs, EBIT_TEST, ENTRY_ABORTED, and Http::METHOD_HEAD.
|
protectedinherited |
Definition at line 363 of file FtpClient.cc.
References StatCounters::all, assert, commUnsetConnTimeout(), DBG_IMPORTANT, debugs, EBIT_TEST, ENTRY_ABORTED, Comm::ERR_CLOSING, ERR_FTP_FAILURE, ERR_READ_ERROR, CommCommonCbParams::fd, fd_bytes(), CommCommonCbParams::flag, StatCounters::ftp, ignoreErrno(), Comm::IsConnOpen(), StatCounters::kbytes_in, Comm::OK, Read, StatCounters::server, CommIoCbParams::size, statCounter, STORE_PENDING, CommCommonCbParams::xerrno, and xstrerr().
Referenced by Ftp::Client::scheduleReadControlReply().
| void Ftp::Gateway::readStor | ( | ) |
Definition at line 2015 of file FtpGateway.cc.
References DBG_IMPORTANT, debugs, ftpFail, Comm::IsConnOpen(), and MYNAME.
Referenced by ftpReadStor().
|
staticinherited |
Definition at line 215 of file AsyncJob.cc.
References Mgr::RegisterAction(), and AsyncJob::ReportAllJobs().
Referenced by mainInitialize().
|
staticprotectedinherited |
Definition at line 198 of file AsyncJob.cc.
References AllJobs().
Referenced by AsyncJob::RegisterWithCacheManager().
| int Ftp::Gateway::restartable | ( | ) |
Definition at line 2065 of file FtpGateway.cc.
Referenced by ftpRestOrList().
|
protectedinherited |
Definition at line 757 of file Client.cc.
References Client::abortOnBadEntry(), Client::adaptedBodySource, Client::checkAdaptationWithBodyCompletion(), and Client::handleMoreAdaptedBodyAvailable().
Referenced by Client::handleMoreAdaptedBodyAvailable().
|
protectedinherited |
DPW 2007-04-23 Looks like there are no longer anymore callers that set buffered_ok=1. Perhaps it can be removed at some point.
Definition at line 326 of file FtpClient.cc.
References comm_read(), commSetConnTimeout(), commUnsetConnTimeout(), Config, SquidConfig::connect, debugs, Comm::IsConnOpen(), JobCallback, min(), SquidConfig::read, Ftp::Client::readControlReply(), Ftp::Client::timeout(), and SquidConfig::Timeout.
Referenced by Ftp::Relay::scheduleReadControlReply().
|
privateinherited |
Definition at line 998 of file Client.cc.
References Client::abortOnData(), FwdState::al, FwdState::dontRetry(), ERR_TOO_BIG, FwdState::fail(), Client::fwd, RefCount< C >::getRaw(), Client::request, and Http::scForbidden.
Referenced by Client::noteAdaptationAclCheckDone().
|
inherited |
Definition at line 608 of file FtpClient.cc.
References Packable::appendf(), comm_local_port(), Config, MemBuf::content(), Ftp::crlf, debugs, SquidConfig::eprt, ERR_FTP_FAILURE, SquidConfig::Ftp, Comm::IsConnOpen(), MAX_IPSTRLEN, and MemBuf::reset().
|
protectedinherited |
Definition at line 416 of file Client.cc.
References assert, MemBuf::contentSize(), Client::dataConnection(), debugs, Client::getMoreRequestBody(), Comm::IsConnOpen(), JobCallback, Client::requestBodySource, Client::requestSender, Client::sentRequestBody(), and Comm::Write().
Referenced by Client::handleMoreRequestBodyAvailable(), and Client::sentRequestBody().
|
inherited |
Closes any old FTP-Data connection which may exist. */
Definition at line 654 of file FtpClient.cc.
References SquidConfig::accessList, Acl::Answer::allowed(), Packable::appendf(), Config, MemBuf::content(), Ftp::crlf, DBG_IMPORTANT, debugs, SquidConfig::epsv_all, ERR_FTP_FAILURE, ACLChecklist::fastCheck(), SquidConfig::Ftp, SquidConfig::ftp_epsv, SquidConfig::passive, MemBuf::reset(), and wordlistDestroy().
Referenced by ftpSendPassive().
|
inherited |
Definition at line 647 of file FtpClient.cc.
References ERR_FTP_FAILURE.
|
overrideprotectedvirtualinherited |
Implements Client.
Definition at line 1081 of file FtpClient.cc.
References StatCounters::ftp, StatCounters::kbytes_out, Ftp::Client::sentRequestBody(), StatCounters::server, CommIoCbParams::size, and statCounter.
Referenced by Ftp::Client::sentRequestBody().
|
inherited |
call when no server communication is expected
Definition at line 167 of file Client.cc.
References assert, Client::closeServer(), Client::completed, debugs, Client::doneWithServer(), Client::requestBodySource, Client::responseBodyBuffer, Client::serverComplete2(), and BodyConsumer::stopConsumingFrom().
Referenced by ftpReadQuit(), HttpStateData::processReplyBody(), and Ftp::Relay::serverComplete().
|
privateinherited |
Continuation of serverComplete
Definition at line 188 of file Client.cc.
References Client::completeForwarding(), debugs, Client::doneWithAdaptation(), BodyProducer::stopProducingFor(), and Client::virginBodyDestination.
Referenced by Client::noteMoreBodySpaceAvailable(), and Client::serverComplete().
|
inline |
Definition at line 151 of file FtpGateway.cc.
References Client::currentOffset.
Referenced by ftpReadRest().
Definition at line 136 of file Client.cc.
References FwdState::al, assert, Client::blockCaching(), debugs, EBIT_TEST, Client::entry, StoreEntry::flags, Client::fwd, Client::haveParsedReplyHeaders(), HTTPMSGLOCK(), StoreEntry::release(), RELEASE_REQUEST, StoreEntry::replaceHttpReply(), AccessLogEntry::reply, StoreEntry::startWriting(), and Client::theFinalReply.
Referenced by Client::adaptOrFinalizeReply(), Client::handleAdaptedHeader(), and Client::noteAdaptationAclCheckDone().
Definition at line 116 of file Client.cc.
References FwdState::al, assert, debugs, Client::fwd, HTTPMSGLOCK(), AccessLogEntry::reply, and Client::theVirginReply.
Referenced by HttpStateData::processReplyHeader().
|
overridevirtual |
Reimplemented from Ftp::Client.
Definition at line 1153 of file FtpGateway.cc.
References debugs, and Ftp::Client::start().
|
staticinherited |
Promises to start the configured job (eventually). The job is deemed to be running asynchronously beyond this point, so the caller should only access the job object via AsyncCalls rather than directly.
swanSong() is only called for jobs for which this method has returned successfully (i.e. without throwing).
Definition at line 37 of file AsyncJob.cc.
References CallJobHere, AsyncJob::start(), and AsyncJob::started_.
Referenced by Ftp::Server::AcceptCtrlConnection(), clientListenerConnectionOpened(), Ipc::Coordinator::handleCacheMgrRequest(), Ipc::Coordinator::handleSnmpRequest(), httpAccept(), httpsAccept(), httpStart(), idnsInitVC(), listenForDataChannel(), Ftp::Server::listenForDataConnection(), Log::TcpLogger::Open(), peerProbeConnect(), Mgr::FunAction::respond(), Mgr::InfoAction::respond(), Ipc::SendMessage(), Mgr::Inquirer::sendResponse(), snmpConstructReponse(), SquidMain(), CacheManager::start(), Adaptation::AccessCheck::Start(), Rock::Rebuild::Start(), JobWaitBase::start_(), BodyPipe::startAutoConsumptionIfNeeded(), Ftp::StartGateway(), Ftp::StartRelay(), and Rock::SwapDir::updateHeaders().
|
protectedinherited |
Definition at line 581 of file Client.cc.
References Client::adaptedHeadSource, FwdState::al, assert, Http::Message::body_pipe, debugs, HttpReply::expectingBody(), Client::fwd, Adaptation::Initiator::initiateAdaptation(), Adaptation::Initiator::initiated(), HttpRequest::method, Must, BodyPipe::setBodySize(), size, Client::startedAdaptation, Client::virginBodyDestination, and Client::virginReply().
Referenced by Client::noteAdaptationAclCheckDone().
|
protectedinherited |
Definition at line 243 of file Client.cc.
References assert, Http::Message::body_pipe, debugs, Client::originalRequest(), Client::requestBodySource, BodyPipe::setConsumerIfNotLate(), and BodyPipe::status().
Referenced by HttpStateData::sendRequest().
|
protectedvirtualinherited |
for debugging, starts with space
Reimplemented in Adaptation::Ecap::XactionRep, Adaptation::Icap::ServiceRep, Adaptation::Icap::Xaction, Adaptation::Initiate, Http::Tunneler, Comm::TcpAcceptor, HappyConnOpener, Ipc::Inquirer, and Security::PeerConnector.
Definition at line 182 of file AsyncJob.cc.
References MemBuf::append(), Packable::appendf(), MemBuf::content(), MemBuf::reset(), AsyncJob::stopReason, and MemBuf::terminate().
Referenced by AsyncJob::callEnd(), AsyncJob::callStart(), Adaptation::Initiate::status(), and Comm::TcpAcceptor::status().
Definition at line 118 of file BodyPipe.cc.
References assert, and debugs.
Referenced by ClientHttpRequest::~ClientHttpRequest(), Client::checkAdaptationWithBodyCompletion(), Client::cleanAdaptation(), Client::doneSendingRequestBody(), ClientHttpRequest::endRequestSatisfaction(), Client::handleRequestBodyProducerAborted(), BodySink::noteBodyProducerAborted(), ClientHttpRequest::noteBodyProducerAborted(), BodySink::noteBodyProductionEnded(), Client::serverComplete(), and Client::swanSong().
Definition at line 107 of file BodyPipe.cc.
References assert, and debugs.
Referenced by ConnStateData::~ConnStateData(), Client::cleanAdaptation(), ConnStateData::finishDechunkingRequest(), Client::noteBodyConsumerAborted(), and Client::serverComplete2().
|
protectedinherited |
Definition at line 1070 of file Client.cc.
References Client::currentOffset, Client::entry, and StoreEntry::write().
Referenced by Client::addVirginReplyBody().
|
overridevirtualinherited |
Reimplemented from AsyncJob.
Reimplemented in Ftp::Relay.
Definition at line 68 of file Client.cc.
References Client::adaptedBodySource, assert, Client::cleanAdaptation(), Client::closeServer(), Client::doneWithFwd, Client::doneWithServer(), Client::fwd, FwdState::handleUnregisteredServerEnd(), Client::requestBodySource, BodyConsumer::stopConsumingFrom(), AsyncJob::swanSong(), and Client::virginBodyDestination.
|
inherited |
Cancel the timeout on the Control socket and establish one on the data socket
Definition at line 1070 of file FtpClient.cc.
References commSetConnTimeout(), commUnsetConnTimeout(), Config, JobCallback, SquidConfig::read, Ftp::Client::timeout(), and SquidConfig::Timeout.
Referenced by ftpReadList(), and ftpReadRetr().
|
overridevirtual |
Reimplemented from Ftp::Client.
Definition at line 488 of file FtpGateway.cc.
References DBG_IMPORTANT, debugs, and Ftp::Client::timeout().
|
pure virtualinherited |
Referenced by AsyncJob::callException(), and AsyncJob::callStart().
| void Ftp::Gateway::unhack | ( | ) |
Forget hack status. Next error is shown to the user
Definition at line 2340 of file FtpGateway.cc.
References debugs, MYNAME, and safe_free.
Referenced by ftpReadCwd(), ftpReadMdtm(), and ftpReadSize().
|
protectedinherited |
Definition at line 102 of file Client.cc.
References assert, and Client::theVirginReply.
|
protectedinherited |
Definition at line 109 of file Client.cc.
References assert, and Client::theVirginReply.
Referenced by Client::adaptOrFinalizeReply(), HttpStateData::continueAfterParsingHeader(), Client::noteAdaptationAclCheckDone(), HttpStateData::persistentConnStatus(), Client::startAdaptation(), HttpStateData::statusIfComplete(), HttpStateData::truncateVirginBody(), and HttpStateData::writeReplyBody().
|
inherited |
Definition at line 824 of file FtpClient.cc.
References Config, debugs, Ftp::escapeIAC(), SquidConfig::Ftp, Comm::IsConnOpen(), JobCallback, safe_free, SquidConfig::telnet, Comm::Write(), Ftp::Client::writeCommandCallback(), and xstrdup.
Referenced by ftpSendCwd(), ftpSendList(), ftpSendMdtm(), ftpSendMkdir(), ftpSendNlst(), ftpSendPass(), ftpSendPORT(), ftpSendQuit(), ftpSendRest(), ftpSendRetr(), ftpSendSize(), ftpSendStor(), ftpSendType(), and ftpSendUser().
|
protectedinherited |
Definition at line 856 of file FtpClient.cc.
References StatCounters::all, CommCommonCbParams::conn, DBG_IMPORTANT, debugs, Comm::ERR_CLOSING, ERR_WRITE_ERROR, CommCommonCbParams::fd, fd_bytes(), CommCommonCbParams::flag, StatCounters::ftp, StatCounters::kbytes_out, StatCounters::server, CommIoCbParams::size, statCounter, Write, CommCommonCbParams::xerrno, and xstrerr().
Referenced by Ftp::Client::writeCommand().
| void Ftp::Gateway::writeReplyBody | ( | const char * | dataToWrite, |
| size_t | dataLength | ||
| ) |
Call this when there is data from the origin server which should be sent to either StoreEntry, or to ICAP...
Definition at line 2638 of file FtpGateway.cc.
References debugs.
|
protectedinherited |
Definition at line 190 of file Client.h.
Referenced by Client::adaptOrFinalizeReply(), Client::addVirginReplyBody(), Client::cleanAdaptation(), Client::doneWithAdaptation(), Client::noteAdaptationAclCheckDone(), and HttpStateData::processReplyBody().
|
protectedinherited |
to consume adated response body
Definition at line 188 of file Client.h.
Referenced by Client::~Client(), Client::checkAdaptationWithBodyCompletion(), Client::cleanAdaptation(), Client::doneWithAdaptation(), Client::handleAdaptedBodyProducerAborted(), Client::handleAdaptedHeader(), Client::handleMoreAdaptedBodyAvailable(), Client::noteBodyProducerAborted(), Client::noteBodyProductionEnded(), Client::noteMoreBodyDataAvailable(), Client::resumeBodyStorage(), and Client::swanSong().
|
protectedinherited |
to get adapted response headers
Definition at line 187 of file Client.h.
Referenced by Client::cleanAdaptation(), Client::doneWithAdaptation(), Client::noteAdaptationAnswer(), and Client::startAdaptation().
|
protectedinherited |
Definition at line 198 of file Client.h.
Referenced by Client::checkAdaptationWithBodyCompletion(), Client::handleAdaptedBodyProducerAborted(), Client::handleAdaptedBodyProductionEnded(), and Client::handleAdaptedHeader().
| String Ftp::Gateway::base_href |
Definition at line 109 of file FtpGateway.cc.
| String Ftp::Gateway::clean_url |
Definition at line 107 of file FtpGateway.cc.
|
privateinherited |
serverComplete() has been called
Definition at line 90 of file Client.h.
Referenced by Client::noteMoreBodySpaceAvailable(), and Client::serverComplete().
| int Ftp::Gateway::conn_att |
Definition at line 110 of file FtpGateway.cc.
|
inherited |
Definition at line 142 of file FtpClient.h.
Referenced by Ftp::Client::Client(), ftpFail(), ftpOpenListenSocket(), ftpReadCwd(), ftpReadEPRT(), ftpReadEPSV(), ftpReadList(), ftpReadMdtm(), ftpReadMkdir(), ftpReadPass(), ftpReadPORT(), ftpReadRest(), ftpReadRetr(), ftpReadSize(), ftpReadTransferDone(), ftpReadType(), ftpReadUser(), ftpReadWelcome(), ftpSendReply(), and ftpWriteTransferDone().
|
protectedinherited |
Our current offset in the StoreEntry
Definition at line 173 of file Client.h.
Referenced by getCurrentOffset(), Client::handleMoreAdaptedBodyAvailable(), Client::haveParsedReplyHeaders(), setCurrentOffset(), and Client::storeReplyBody().
| String Ftp::Gateway::cwd_message |
Definition at line 120 of file FtpGateway.cc.
Referenced by ftpReadCwd().
|
inherited |
Definition at line 143 of file FtpClient.h.
Referenced by ftpOpenListenSocket(), ftpReadList(), ftpReadRetr(), ftpSendPORT(), and Ftp::Relay::HandleStoreAbort().
|
protectedinherited |
Waits for an FTP data connection to the server to be established/opened. This wait only happens in FTP passive mode (via PASV or EPSV).
Definition at line 210 of file FtpClient.h.
| char* Ftp::Gateway::dirpath |
Definition at line 116 of file FtpGateway.cc.
Referenced by ftpTraverseDirectory().
|
protectedinherited |
whether we should not be talking to FwdState; XXX: clear fwd instead points to a string literal which is used only for debugging
Definition at line 211 of file Client.h.
Referenced by Client::completeForwarding(), HttpStateData::httpStateConnClosed(), HttpStateData::proceedAfter1xx(), and Client::swanSong().
|
inherited |
Definition at line 177 of file Client.h.
Referenced by Client::Client(), Gateway(), HttpStateData::HttpStateData(), Ftp::Relay::Relay(), Client::~Client(), Client::abortOnBadEntry(), Client::blockCaching(), HttpStateData::buildRequestPrefix(), HttpStateData::continueAfterParsingHeader(), Client::delayRead(), ftpFail(), ftpSendReply(), ftpWriteTransferDone(), Client::handleAdaptationAborted(), Client::handleAdaptationBlocked(), Client::handledEarlyAdaptationAbort(), Client::handleMoreAdaptedBodyAvailable(), HttpStateData::handleRequestBodyProducerAborted(), HttpStateData::haveParsedReplyHeaders(), HttpStateData::httpBuildRequestHeader(), HttpStateData::httpTimeout(), HttpStateData::keepaliveAccounting(), HttpStateData::peerSupportsConnectionPinning(), HttpStateData::processReply(), HttpStateData::processReplyBody(), HttpStateData::processReplyHeader(), HttpStateData::processSurrogateControl(), HttpStateData::readReply(), HttpStateData::reusableReply(), Client::sentRequestBody(), Client::setFinalReply(), HttpStateData::statusIfComplete(), Client::storeReplyBody(), and HttpStateData::wroteLast().
| char* Ftp::Gateway::filepath |
Definition at line 115 of file FtpGateway.cc.
Referenced by ftpGetFile(), ftpReadMkdir(), ftpSendCwd(), ftpSendList(), ftpSendMdtm(), ftpSendMkdir(), ftpSendNlst(), ftpSendRetr(), ftpSendSize(), ftpSendStor(), ftpTraverseDirectory(), and ftpTrySlashHack().
| GatewayFlags Ftp::Gateway::flags |
Definition at line 125 of file FtpGateway.cc.
Referenced by Gateway(), ftpFail(), ftpGetFile(), ftpListDir(), ftpReadCwd(), ftpReadList(), ftpReadMkdir(), ftpReadRest(), ftpReadRetr(), ftpReadTransferDone(), ftpReadWelcome(), ftpRestOrList(), ftpSendCwd(), ftpSendNlst(), ftpSendPassive(), ftpSendPORT(), ftpSendSize(), ftpSendType(), ftpTraverseDirectory(), and ftpTrySlashHack().
| enum { ... } Ftp::Client::ftp_state_t |
|
static |
Definition at line 155 of file FtpGateway.cc.
|
inherited |
Definition at line 178 of file Client.h.
Referenced by Client::Client(), HttpStateData::HttpStateData(), Client::adaptOrFinalizeReply(), Client::blockCaching(), HttpStateData::buildRequestPrefix(), HttpStateData::closeServer(), Client::completeForwarding(), HttpStateData::continueAfterParsingHeader(), HttpStateData::drop1xx(), HttpStateData::finishingBrokenPost(), HttpStateData::forwardUpgrade(), ftpFail(), ftpSendReply(), HttpStateData::handle1xx(), Client::handleAdaptationBlocked(), Client::handledEarlyAdaptationAbort(), HttpStateData::handleRequestBodyProducerAborted(), Client::handleRequestBodyProducerAborted(), HttpStateData::httpTimeout(), HttpStateData::markPrematureReplyBodyEofFailure(), HttpStateData::proceedAfter1xx(), HttpStateData::processReplyBody(), HttpStateData::readReply(), Client::sendBodyIsTooLargeError(), Client::sentRequestBody(), Client::setFinalReply(), Client::setVirginReply(), Client::startAdaptation(), Client::swanSong(), and HttpStateData::wroteLast().
|
inherited |
Definition at line 75 of file AsyncJob.h.
|
protectedinherited |
Definition at line 86 of file AsyncJob.h.
Referenced by AsyncJob::callEnd(), AsyncJob::callStart(), AsyncJob::canBeCalled(), AsyncJob::deleteThis(), and AsyncJob::mustStop().
| size_t Ftp::Gateway::list_width |
Definition at line 119 of file FtpGateway.cc.
| MemBuf Ftp::Gateway::listing |
Definition at line 123 of file FtpGateway.cc.
| int Ftp::Gateway::login_att |
Definition at line 111 of file FtpGateway.cc.
Referenced by ftpReadWelcome().
|
protectedinherited |
markParsedVirginReplyAsWhole() parameter (if that method was called) or nil; points to a string literal which is used only for debugging
Definition at line 207 of file Client.h.
Referenced by Client::completeForwarding(), and Client::markParsedVirginReplyAsWhole().
| time_t Ftp::Gateway::mdtm |
Definition at line 112 of file FtpGateway.cc.
Referenced by ftpFail(), ftpReadMdtm(), and ftpSendReply().
| char* Ftp::Gateway::old_filepath |
Definition at line 121 of file FtpGateway.cc.
|
inherited |
Definition at line 178 of file FtpClient.h.
Referenced by ftpSendReply().
|
inherited |
Definition at line 177 of file FtpClient.h.
Referenced by ftpSendReply().
| char Ftp::Gateway::password[MAX_URL] |
Definition at line 103 of file FtpGateway.cc.
Referenced by Gateway(), and ftpSendPass().
| int Ftp::Gateway::password_url |
Definition at line 104 of file FtpGateway.cc.
| wordlist* Ftp::Gateway::pathcomps |
Definition at line 114 of file FtpGateway.cc.
Referenced by ftpReadType(), ftpTraverseDirectory(), and ftpTrySlashHack().
| char* Ftp::Gateway::proxy_host |
Definition at line 118 of file FtpGateway.cc.
Referenced by ftpSendUser().
|
protectedinherited |
Whether the entire adapted response (including bodyless responses) has been successfully produced. A successful end of body production does not imply that we have consumed all of the produced body bytes.
Definition at line 196 of file Client.h.
Referenced by Client::checkAdaptationWithBodyCompletion(), Client::completeForwarding(), Client::handleAdaptedBodyProducerAborted(), Client::handleAdaptedBodyProductionEnded(), and Client::handleAdaptedHeader().
|
protectedinherited |
Definition at line 200 of file Client.h.
Referenced by HttpStateData::finishingChunkedRequest(), HttpStateData::getMoreRequestBody(), Client::handleRequestBodyProductionEnded(), and Client::sentRequestBody().
| char* Ftp::Gateway::reply_hdr |
Definition at line 105 of file FtpGateway.cc.
| int Ftp::Gateway::reply_hdr_state |
Definition at line 106 of file FtpGateway.cc.
|
inherited |
Definition at line 179 of file Client.h.
Referenced by Gateway(), HttpStateData::HttpStateData(), HttpStateData::buildRequestPrefix(), HttpStateData::checkDateSkew(), HttpStateData::continueAfterParsingHeader(), HttpStateData::decideIfWeDoRanges(), HttpStateData::drop1xx(), HttpStateData::forwardUpgrade(), ftpFail(), ftpReadType(), ftpSendPassive(), ftpSendReply(), ftpSendStor(), ftpSendType(), ftpSendUser(), HttpStateData::handle1xx(), Client::handleAdaptationBlocked(), Client::handledEarlyAdaptationAbort(), HttpStateData::haveParsedReplyHeaders(), HttpStateData::httpBuildRequestHeader(), HttpStateData::keepaliveAccounting(), Client::maybePurgeOthers(), Client::noteAdaptationAclCheckDone(), Client::originalRequest(), HttpStateData::peerSupportsConnectionPinning(), HttpStateData::persistentConnStatus(), HttpStateData::proceedAfter1xx(), HttpStateData::processReplyBody(), HttpStateData::processReplyHeader(), HttpStateData::processSurrogateControl(), HttpStateData::readReply(), HttpStateData::reusableReply(), Client::sendBodyIsTooLargeError(), HttpStateData::sendRequest(), Client::sentRequestBody(), HttpStateData::statusIfComplete(), HttpStateData::truncateVirginBody(), HttpStateData::writeReplyBody(), and HttpStateData::wroteLast().
|
protectedinherited |
to consume request body
Definition at line 182 of file Client.h.
Referenced by Client::~Client(), Client::doneSendingRequestBody(), Client::getMoreRequestBody(), HttpStateData::getMoreRequestBody(), Client::handleRequestBodyProducerAborted(), Client::noteBodyProducerAborted(), Client::noteBodyProductionEnded(), Client::noteMoreBodyDataAvailable(), Client::sendMoreRequestBody(), HttpStateData::sendRequest(), Client::sentRequestBody(), Client::serverComplete(), Client::startRequestBodyFlow(), and Client::swanSong().
|
protectedinherited |
set if we are expecting Comm::Write to call us back
Definition at line 183 of file Client.h.
Referenced by HttpStateData::finishingBrokenPost(), HttpStateData::finishingChunkedRequest(), Client::handleMoreRequestBodyAvailable(), Client::handleRequestBodyProducerAborted(), Client::handleRequestBodyProductionEnded(), Client::sendMoreRequestBody(), HttpStateData::sendRequest(), and Client::sentRequestBody().
|
protectedinherited |
Data temporarily buffered for ICAP
Definition at line 174 of file Client.h.
Referenced by Client::~Client(), Client::adaptVirginReplyBody(), Client::calcBufferSpaceToReserve(), HttpStateData::canBufferMoreReplyBytes(), Client::noteMoreBodySpaceAvailable(), HttpStateData::readReply(), and Client::serverComplete().
| int64_t Ftp::Gateway::restart_offset |
Definition at line 117 of file FtpGateway.cc.
Referenced by ftpReadRest(), and ftpSendRest().
|
privateinherited |
XXX: An old hack for FTP servers like ftp.netscape.com that may not respond to PASV. Use faster connect timeout instead of read timeout.
Definition at line 217 of file FtpClient.h.
|
protectedinherited |
Definition at line 88 of file AsyncJob.h.
Referenced by AsyncJob::~AsyncJob(), AsyncJob::callEnd(), and AsyncJob::Start().
|
protectedinherited |
Definition at line 191 of file Client.h.
Referenced by Client::adaptVirginReplyBody(), Client::addVirginReplyBody(), Client::checkAdaptationWithBodyCompletion(), Client::completeForwarding(), and Client::startAdaptation().
|
inherited |
Definition at line 176 of file FtpClient.h.
Referenced by ftpFail(), ftpReadList(), ftpReadRetr(), ftpSendCwd(), ftpSendList(), ftpSendMdtm(), ftpSendMkdir(), ftpSendNlst(), ftpSendPass(), ftpSendPassive(), ftpSendPORT(), ftpSendQuit(), ftpSendRest(), ftpSendRetr(), ftpSendSize(), ftpSendStor(), ftpSendType(), and ftpSendUser().
|
protectedinherited |
Definition at line 84 of file AsyncJob.h.
Referenced by AsyncJob::deleteThis(), AsyncJob::done(), AsyncJob::mustStop(), AsyncJob::status(), and HappyConnOpener::status().
|
protectedinherited |
Definition at line 89 of file AsyncJob.h.
Referenced by AsyncJob::~AsyncJob(), and AsyncJob::callEnd().
|
privateinherited |
adapted reply from ICAP or virgin reply
Definition at line 218 of file Client.h.
Referenced by Client::~Client(), Client::finalReply(), Client::haveParsedReplyHeaders(), Client::maybePurgeOthers(), and Client::setFinalReply().
| int64_t Ftp::Gateway::theSize |
Definition at line 113 of file FtpGateway.cc.
Referenced by ftpFail(), ftpReadSize(), and ftpSendPassive().
|
privateinherited |
reply received from the origin server
Definition at line 217 of file Client.h.
Referenced by Client::~Client(), Client::setVirginReply(), Client::virginReply(), and Client::virginReply().
| String Ftp::Gateway::title_url |
Definition at line 108 of file FtpGateway.cc.
Referenced by ftpListDir(), and ftpReadSize().
| char Ftp::Gateway::typecode |
Definition at line 122 of file FtpGateway.cc.
Referenced by ftpRestOrList(), and ftpSendType().
|
protectedinherited |
Definition at line 85 of file AsyncJob.h.
Referenced by AsyncJob::AsyncJob(), Adaptation::Icap::Xaction::Xaction(), AsyncJob::~AsyncJob(), AsyncJob::callEnd(), AsyncJob::callStart(), AsyncJob::deleteThis(), and AsyncJob::mustStop().
| char Ftp::Gateway::user[MAX_URL] |
Definition at line 102 of file FtpGateway.cc.
Referenced by Gateway(), and ftpSendUser().
|
protectedinherited |
to provide virgin response body
Definition at line 186 of file Client.h.
Referenced by Client::~Client(), Client::adaptVirginReplyBody(), Client::calcBufferSpaceToReserve(), Client::cleanAdaptation(), Client::doneWithAdaptation(), Client::noteBodyConsumerAborted(), HttpStateData::readReply(), Client::serverComplete2(), Client::startAdaptation(), and Client::swanSong().
|
protectedinherited |
Definition at line 203 of file Client.h.
Referenced by Client::delayRead(), HttpStateData::maybeReadVirginBody(), and HttpStateData::noteDelayAwareReadChance().