]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/AccessLogEntry.cc
2 #include "AccessLogEntry.h"
4 #include "HttpRequest.h"
5 #include "SquidConfig.h"
6 #include "ssl/support.h"
9 AccessLogEntry::SslDetails::SslDetails(): user(NULL
), bumpMode(::Ssl::bumpEnd
)
15 AccessLogEntry::getLogClientIp(char *buf
, size_t bufsz
) const
17 #if FOLLOW_X_FORWARDED_FOR
18 if (Config
.onoff
.log_uses_indirect_client
&& request
)
19 request
->indirect_client_addr
.NtoA(buf
, bufsz
);
22 if (tcpClient
!= NULL
)
23 tcpClient
->remote
.NtoA(buf
, bufsz
);
24 else if (cache
.caddr
.IsNoAddr()) // e.g., ICAP OPTIONS lack client
27 cache
.caddr
.NtoA(buf
, bufsz
);
30 AccessLogEntry::~AccessLogEntry()
32 safe_free(headers
.request
);
35 safe_free(adapt
.last_meta
);
38 safe_free(headers
.reply
);
39 safe_free(cache
.authuser
);
41 safe_free(headers
.adapted_request
);
42 HTTPMSGUNLOCK(adapted_request
);
45 HTTPMSGUNLOCK(request
);
47 HTTPMSGUNLOCK(icap
.reply
);
48 HTTPMSGUNLOCK(icap
.request
);
50 cbdataReferenceDone(cache
.port
);