38 debugs(76, 3, clientConn <<
" requesting '" << upath <<
"'");
42 static const SBuf netdbUri(
"/squid-internal-dynamic/netdb");
43 static const SBuf storeDigestUri(
"/squid-internal-periodic/store_digest");
45 if (upath == netdbUri) {
47 }
else if (upath == storeDigestUri) {
49 const char *msgbuf =
"This cache is currently building its digest.\n";
52 const char *msgbuf =
"This cache does not support Cache Digests.\n";
58 entry->
append(msgbuf, strlen(msgbuf));
61 debugs(17, 2,
"calling CacheManager due to URL-path");
64 debugObj(76, 1,
"internalStart: unknown request:\n",
74 static const SBuf InternalPfx(
"/squid-internal-");
81 static const SBuf InternalStaticPfx(
"/squid-internal-static");
127 mb.
append(dir, strlen(dir));
143 const bool secure =
false;
171 if (w.caseCmp(arg) == 0)
#define Assure(condition)
void httpRequestPack(void *obj, Packable *p)
#define SQUIDSBUFPRINT(s)
bool urlAppendDomain(char *host)
apply append_domain config to the given hostname
SBuf & authority(bool requirePort=false) const
SBuf & absolutePath() const
RFC 3986 section 4.2 relative reference called 'absolute-path'.
void port(const Port p)
reset authority port subcomponent
void host(const char *src)
static CacheManager * GetInstance()
static const SBuf & WellKnownUrlPathPrefix()
initial URL path characters that identify cache manager requests
void start(const Comm::ConnectionPointer &client, HttpRequest *request, StoreEntry *entry, const AccessLogEntryPointer &ale)
void setHeaders(Http::StatusCode status, const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires)
AnyP::Uri url
the request URI
unsigned int toHostStr(char *buf, const unsigned int len) const
void append(const char *c, int sz) override
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
int caseCmp(const SBuf &S, const size_type n) const
shorthand version for case-insensitive compare()
const char * rawContent() const
size_type length() const
Returns the number of bytes stored in SBuf.
bool startsWith(const SBuf &S, const SBufCaseSensitive isCaseSensitive=caseSensitive) const
void replaceHttpReply(const HttpReplyPointer &, const bool andStartWriting=true)
void append(char const *, int) override
Appends a c-string to existing packed data.
#define debugs(SECTION, LEVEL, CONTENT)
void encrypt(char *nachr, int decr)
void errorAppendEntry(StoreEntry *entry, ErrorState *err)
bool ForSomeCacheManager(const SBuf &urlPath)
bool internalStaticCheck(const SBuf &urlPath)
char * internalLocalUri(const char *dir, const SBuf &name)
bool internalCheck(const SBuf &urlPath)
char * internalRemoteUri(bool encrypt, const char *host, unsigned short port, const char *dir, const SBuf &name)
const char * internalHostname(void)
void internalStart(const Comm::ConnectionPointer &clientConn, HttpRequest *request, StoreEntry *entry, const AccessLogEntry::Pointer &ale)
bool internalHostnameIs(const SBuf &arg)
void netdbBinaryExchange(StoreEntry *s)
#define LOCAL_ARRAY(type, name, size)
char * xstrncpy(char *dst, const char *src, size_t n)