From aff439e0a4a5ecc470eb12472869200c98c658ee Mon Sep 17 00:00:00 2001 From: Source Maintenance Date: Fri, 4 Nov 2016 18:12:20 +0000 Subject: [PATCH] SourceFormat Enforcement --- src/FwdState.cc | 1 - src/client_side.cc | 13 +++++++------ src/servers/Http1Server.cc | 24 ++++++++++++------------ src/tunnel.cc | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/FwdState.cc b/src/FwdState.cc index da6927b598..ddcdbebdbe 100644 --- a/src/FwdState.cc +++ b/src/FwdState.cc @@ -866,7 +866,6 @@ FwdState::connectStart() return; } - // Pinned connection failure. debugs(17,2,HERE << "Pinned connection failed: " << pinned_connection); ErrorState *anErr = new ErrorState(ERR_ZERO_SIZE_OBJECT, Http::scServiceUnavailable, request); diff --git a/src/client_side.cc b/src/client_side.cc index 7e0de1b88a..0ceffb4835 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -3403,9 +3403,9 @@ ConnStateData::buildFakeRequest(Http::MethodType const method, SBuf &useHost, un http->uri = SBufToCstring(useHost); stream->flags.parsed_ok = 1; // Do we need it? stream->mayUseConnection(true); - + AsyncCall::Pointer timeoutCall = commCbCall(5, 4, "clientLifetimeTimeout", - CommTimeoutCbPtrFun(clientLifetimeTimeout, stream->http)); + CommTimeoutCbPtrFun(clientLifetimeTimeout, stream->http)); commSetConnTimeout(clientConnection, Config.Timeout.lifetime, timeoutCall); stream->registerWithConn(); @@ -4097,9 +4097,10 @@ ConnStateData::mayTunnelUnsupportedProto() { return Config.accessList.on_unsupported_protocol #if USE_OPENSSL - && - ((port->flags.isIntercepted() && port->flags.tunnelSslBumping) - || (serverBump() && pinning.serverConnection)) + && + ((port->flags.isIntercepted() && port->flags.tunnelSslBumping) + || (serverBump() && pinning.serverConnection)) #endif - ; + ; } + diff --git a/src/servers/Http1Server.cc b/src/servers/Http1Server.cc index 959f6dd5d6..b564896c3c 100644 --- a/src/servers/Http1Server.cc +++ b/src/servers/Http1Server.cc @@ -196,20 +196,20 @@ Http::One::Server::buildHttpRequest(Http::StreamPointer &context) void Http::One::Server::setReplyError(Http::StreamPointer &context, HttpRequest::Pointer &request, const HttpRequestMethod& method, err_type requestError, Http::StatusCode errStatusCode, const char *requestErrorBytes) { - quitAfterError(request.getRaw()); - if (!context->connRegistered()) { - debugs(33, 2, "Client stream deregister it self, nothing to do"); - clientConnection->close(); - return; - } - clientStreamNode *node = context->getClientReplyContext(); - clientReplyContext *repContext = dynamic_cast(node->data.getRaw()); - assert (repContext); + quitAfterError(request.getRaw()); + if (!context->connRegistered()) { + debugs(33, 2, "Client stream deregister it self, nothing to do"); + clientConnection->close(); + return; + } + clientStreamNode *node = context->getClientReplyContext(); + clientReplyContext *repContext = dynamic_cast(node->data.getRaw()); + assert (repContext); - repContext->setReplyToError(requestError, errStatusCode, method, context->http->uri, clientConnection->remote, nullptr, requestErrorBytes, nullptr); + repContext->setReplyToError(requestError, errStatusCode, method, context->http->uri, clientConnection->remote, nullptr, requestErrorBytes, nullptr); - assert(context->http->out.offset == 0); - context->pullData(); + assert(context->http->out.offset == 0); + context->pullData(); } void diff --git a/src/tunnel.cc b/src/tunnel.cc index 8c80693d56..b04553df49 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -105,7 +105,7 @@ public: /// Whether the client sent a CONNECT request to us. bool clientExpectsConnectResponse() const { - // If we are forcing a tunnel after receiving a client CONNECT, then we + // If we are forcing a tunnel after receiving a client CONNECT, then we // have already responded to that CONNECT before tunnel.cc started. if (request && request->flags.forceTunnel) return false; -- 2.47.2