Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions src/FwdState.cc
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ FwdState::checkRetry()
if (exhaustedTries())
return false;

if (request->flags.pinned && !pinnedCanRetry())
if (request->flags.pinned)
return false;

if (!EnoughTimeToReForward(start_t))
Expand Down Expand Up @@ -1323,7 +1323,7 @@ FwdState::reforward()

debugs(17, 3, e->url() << "?" );

if (request->flags.pinned && !pinnedCanRetry()) {
if (request->flags.pinned) {
debugs(17, 3, "pinned connection; cannot retry");
return 0;
}
Expand Down Expand Up @@ -1418,28 +1418,6 @@ FwdState::exhaustedTries() const
return n_tries >= Config.forward_max_tries;
}

bool
FwdState::pinnedCanRetry() const
{
assert(request->flags.pinned);

// pconn race on pinned connection: Currently we do not have any mechanism
// to retry current pinned connection path.
if (pconnRace == raceHappened)
return false;

// If a bumped connection was pinned, then the TLS client was given our peer
// details. Do not retry because we do not ensure that those details stay
// constant. Step1-bumped connections do not get our TLS peer details, are
// never pinned, and, hence, never reach this method.
if (request->flags.sslBumped)
return false;

// The other pinned cases are FTP proxying and connection-based HTTP
// authentication. TODO: Do these cases have restrictions?
return true;
}

time_t
FwdState::connectingTimeout(const Comm::ConnectionPointer &conn) const
{
Expand Down
4 changes: 0 additions & 4 deletions src/FwdState.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ class FwdState: public RefCountable, public PeerSelectionInitiator

void usePinned();

/// whether a pinned to-peer connection can be replaced with another one
/// (in order to retry or reforward a failed request)
bool pinnedCanRetry() const;

template <typename StepStart>
void advanceDestination(const char *stepDescription, const Comm::ConnectionPointer &conn, const StepStart &startStep);

Expand Down
2 changes: 1 addition & 1 deletion src/tunnel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ TunnelStateData::checkRetry()
if (request->hier.peer_reply_status != Http::scNone && !Http::IsReforwardableStatus(request->hier.peer_reply_status))
return "received HTTP status code is not reforwardable";

// TODO: check pinned connections; see FwdState::pinnedCanRetry()
// TODO: check pinned connections; see request->flags.pinned in FwdState::checkRetry()
return nullptr;
}

Expand Down
Loading