]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/ssl/ServerBump.cc
2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 /* DEBUG: section 33 Client-side Routines */
13 #include "client_side.h"
15 #include "ssl/ServerBump.h"
17 #include "StoreClient.h"
20 CBDATA_NAMESPACED_CLASS_INIT(Ssl
, ServerBump
);
22 Ssl::ServerBump::ServerBump(HttpRequest
*fakeRequest
, StoreEntry
*e
, Ssl::BumpMode md
):
27 debugs(33, 4, "will peek at " << request
->url
.authority(true));
29 act
.step2
= act
.step3
= Ssl::bumpNone
;
33 entry
->lock("Ssl::ServerBump");
35 // XXX: Performance regression. c_str() reallocates
36 SBuf
uri(request
->effectiveRequestUri());
37 entry
= storeCreateEntry(uri
.c_str(), uri
.c_str(), request
->flags
, request
->method
);
39 // We do not need to be a client because the error contents will be used
40 // later, but an entry without any client will trim all its contents away.
41 sc
= storeClientListAdd(entry
, this);
44 Ssl::ServerBump::~ServerBump()
46 debugs(33, 4, HERE
<< "destroying");
48 debugs(33, 4, HERE
<< *entry
);
49 storeUnregister(sc
, entry
, this);
50 entry
->unlock("Ssl::ServerBump");
52 cbdataReferenceDone(sslErrors
);