#define MAX_FWD_STATS_IDX 9
static int FwdReplyCodes[MAX_FWD_STATS_IDX + 1][Http::scInvalidHeader + 1];
-static PconnPool *fwdPconnPool = new PconnPool("server-side", NULL);
+static PconnPool *fwdPconnPool = new PconnPool("server-peers", NULL);
CBDATA_CLASS_INIT(FwdState);
#if USE_OPENSSL
serverConn = NULL;
}
-// Legacy method to be removed in favor of the above as soon as possible
+// \deprecated use unregister(Comm::ConnectionPointer &conn) instead
void
FwdState::unregister(int fd)
{
}
/**
- * server-side modules call fwdComplete() when they are done
+ * FooClient modules call fwdComplete() when they are done
* downloading an object. Then, we either 1) re-forward the
* request somewhere else if needed, or 2) call storeComplete()
* to finish it off
*
* Return TRUE if the request SHOULD be retried. This method is
* called when the HTTP connection fails, or when the connection
- * is closed before server-side read the end of HTTP headers.
+ * is closed before reading the end of HTTP headers from the server.
*/
bool
FwdState::checkRetry()
*
* returns TRUE if the transaction SHOULD be re-forwarded to the
* next choice in the serverDestinations list. This method is called when
- * server-side communication completes normally, or experiences
+ * peer communication completes normally, or experiences
* some error after receiving the end of HTTP headers.
*/
int
Http::StatusCode peer_reply_status; ///< last HTTP status code received
timeval peer_http_request_sent; ///< last peer finished writing req
int64_t peer_response_time; ///< last peer response delay
- Comm::ConnectionPointer tcpServer; ///< TCP/IP level details of the last server-side connection
+ Comm::ConnectionPointer tcpServer; ///< TCP/IP level details of the last peer/server connection
int64_t bodyBytesRead; ///< number of body bytes received from the next hop or -1
private:
Here is a typical adaptation code sequence:
-- Master caller (client- or server-side): Checks ACL and starts
- Adaptation::Iterator for the ACL-selected ServiceGroup.
+- Master caller: Checks ACL and starts Adaptation::Iterator for the
+ ACL-selected ServiceGroup.
- Adaptation::Iterator: Creates ServicePlan and executes it, launching one
service adaptation per step. Abandons the original plan and builds a dynamic
[http::]<pt Peer response time in milliseconds. The timer starts
when the last request byte is sent to the next hop
and stops when the last response byte is received.
- [http::]<tt Total server-side time in milliseconds. The timer
+ [http::]<tt Total time in milliseconds. The timer
starts with the first connect request (or write I/O)
sent to the first selected peer. The timer stops
with the last I/O with the last peer.
LOC: Config.Timeout.read
DEFAULT: 15 minutes
DOC_START
- The read_timeout is applied on server-side connections. After
- each successful read(), the timeout will be extended by this
+ Applied on peer server connections.
+
+ After each successful read(), the timeout will be extended by this
amount. If no data is read again after this amount of time,
- the request is aborted and logged with ERR_READ_TIMEOUT. The
- default is 15 minutes.
+ the request is aborted and logged with ERR_READ_TIMEOUT.
+
+ The default is 15 minutes.
DOC_END
NAME: write_timeout
finishDechunkingRequest(false);
// XXX: The code below works if we fail during initial request parsing,
- // but if we fail when the server-side works already, the server may send
+ // but if we fail when the server connection is used already, the server may send
// us its response too, causing various assertions. How to prevent that?
#if WE_KNOW_HOW_TO_SEND_ERRORS
ClientSocketContext::Pointer context = getCurrentContext();
bool handleRequestBodyData();
/// Forward future client requests using the given server connection.
- /// Optionally, monitor pinned server connection for server-side closures.
+ /// Optionally, monitor pinned server connection for remote-end closures.
void pinConnection(const Comm::ConnectionPointer &pinServerConn, HttpRequest *request, CachePeer *peer, bool auth, bool monitor = true);
/// Undo pinConnection() and, optionally, close the pinned connection.
void unpinConnection(const bool andClose);
/// Called when the initialization of peek-and-splice negotiation finidhed
void startPeekAndSpliceDone();
/// Called when a peek-and-splice step finished. For example after
- /// server-side SSL certificates received and client-side SSL certificates
+ /// server SSL certificates received and fake server SSL certificates
/// generated
void doPeekAndSpliceStep();
/// called by FwdState when it is done bumping the server
if (abortOnBadEntry("entry went bad while waiting for ICAP ACL check"))
return;
- // TODO: Should nonICAP and postICAP path check this on the server-side?
- // That check now only happens on client-side, in processReplyAccess().
+ // TODO: Should non-ICAP and ICAP REPMOD pre-cache paths check this?
+ // That check now only happens on REQMOD pre-cache and REPMOD post-cache, in processReplyAccess().
if (virginReply()->expectedBodyTooLarge(*request)) {
sendBodyIsTooLargeError();
return;
}
- // TODO: Should we check receivedBodyTooLarge on the server-side as well?
+ // TODO: Should we check receivedBodyTooLarge as well?
if (!group) {
debugs(11,3, HERE << "no adapation needed");
class HttpReply;
/**
- * Client is a common base for server-side classes such as
- * HttpStateData and FtpStateData. All such classes must be able to
- * consume request bodies from the client-side or ICAP producer, adapt
- * virgin responses using ICAP, and provide the client-side consumer with
- * responses.
+ * Client is a common base for classes such as HttpStateData and FtpStateData.
+ * All such classes must be able to consume request bodies from a BodyPipe
+ * or ICAP producer, adapt virgin responses using ICAP, and provide a
+ * consumer with responses.
*/
class Client:
#if USE_ADAPTATION
typedef enum {
ERR_DETAIL_NONE,
ERR_DETAIL_START = 100000, // to avoid clashes with most OS error numbers
- ERR_DETAIL_CLT_REQMOD_ABORT = ERR_DETAIL_START, // client-side detected transaction abort
- ERR_DETAIL_CLT_REQMOD_REQ_BODY, // client-side detected REQMOD request body adaptation failure
- ERR_DETAIL_CLT_REQMOD_RESP_BODY, // client-side detected REQMOD satisfaction reply body failure
- ERR_DETAIL_SRV_REQMOD_REQ_BODY, // server-side detected REQMOD request body abort
+ ERR_DETAIL_CLT_REQMOD_ABORT = ERR_DETAIL_START, // client-facing code detected transaction abort
+ ERR_DETAIL_CLT_REQMOD_REQ_BODY, // client-facing code detected REQMOD request body adaptation failure
+ ERR_DETAIL_CLT_REQMOD_RESP_BODY, // client-facing code detected REQMOD satisfaction reply body failure
+ ERR_DETAIL_SRV_REQMOD_REQ_BODY, // server-facing code detected REQMOD request body abort
ERR_DETAIL_ICAP_RESPMOD_EARLY, // RESPMOD failed w/o store entry
ERR_DETAIL_ICAP_RESPMOD_LATE, // RESPMOD failed with a store entry
ERR_DETAIL_REQMOD_BLOCK, // REQMOD denied client access
/*
* Set the read timeout here because it hasn't been set yet.
* We only set the read timeout after the request has been
- * fully written to the server-side. If we start the timeout
+ * fully written to the peer. If we start the timeout
* after connection establishment, then we are likely to hit
* the timeout for POST/PUT requests that have very large
* request bodies.
namespace Mgr
{
-/// store server-side network read() size histograms
+/// store size histograms of network read() from peer server
class IoActionData
{
public:
explicit ServerBump(HttpRequest *fakeRequest, StoreEntry *e = NULL, Ssl::BumpMode mode = Ssl::bumpServerFirst);
~ServerBump();
- /// faked, minimal request; required by server-side API
+ /// faked, minimal request; required by Client API
HttpRequest::Pointer request;
StoreEntry *entry; ///< for receiving Squid-generated error messages
Ssl::X509_Pointer serverCert; ///< HTTPS server certificate
/*
* Someone wants to abort this transfer. Set the reason in the
- * request structure, call the server-side callback and mark the
+ * request structure, call the callback and mark the
* entry for releasing
*/
void
/*
* We used to check for ENTRY_ABORTED here. But there were some
* problems. For example, we might have a slow client (or two) and
- * the server-side is reading far ahead and swapping to disk. Even
- * if the server-side aborts, we want to give the client(s)
+ * the peer server is reading far ahead and swapping to disk. Even
+ * if the peer aborts, we want to give the client(s)
* everything we got before the abort condition occurred.
*/
/* Warning: doCopy may indirectly free itself in callbacks,
/*
* Wait until we are below the disk FD limit, only if the
- * next server-side read won't be deferred.
+ * next read won't be deferred.
*/
if (storeTooManyDiskFilesOpen() && !checkDeferRead(-1))
return;