#include "squid.h"
#include "AccessLogEntry.h"
#include "base/Assure.h"
#include "CacheManager.h"
#include "comm/Connection.h"
#include "errorpage.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "icmp/net_db.h"
#include "internal.h"
#include "MemBuf.h"
#include "SquidConfig.h"
#include "Store.h"
#include "tools.h"
#include "util.h"
#include "wordlist.h"
Go to the source code of this file.
Functions | |
void | internalStart (const Comm::ConnectionPointer &clientConn, HttpRequest *request, StoreEntry *entry, const AccessLogEntry::Pointer &ale) |
bool | internalCheck (const SBuf &urlPath) |
bool | internalStaticCheck (const SBuf &urlPath) |
bool | ForSomeCacheManager (const SBuf &urlPath) |
char * | internalRemoteUri (bool encrypt, const char *host, unsigned short port, const char *dir, const SBuf &name) |
char * | internalLocalUri (const char *dir, const SBuf &name) |
const char * | internalHostname (void) |
int | internalHostnameIs (const char *arg) |
Function Documentation
◆ ForSomeCacheManager()
bool ForSomeCacheManager | ( | const SBuf & | urlPath | ) |
whether the given request URL path points to a cache manager (not necessarily running on this Squid instance)
Definition at line 87 of file internal.cc.
References SBuf::startsWith(), and CacheManager::WellKnownUrlPathPrefix().
Referenced by ClientHttpRequest::checkForInternalAccess(), and internalStart().
◆ internalCheck()
bool internalCheck | ( | const SBuf & | urlPath | ) |
Definition at line 73 of file internal.cc.
References SBuf::startsWith().
Referenced by ClientHttpRequest::checkForInternalAccess(), and ConnStateData::parseHttpRequest().
◆ internalHostname()
const char * internalHostname | ( | void | ) |
Definition at line 150 of file internal.cc.
References SquidConfig::appendDomain, Config, getMyHostname(), LOCAL_ARRAY, SQUIDHOSTNAMELEN, Tolower(), and xstrncpy().
Referenced by ClientHttpRequest::checkForInternalAccess(), and internalHostnameIs().
◆ internalHostnameIs()
int internalHostnameIs | ( | const char * | arg | ) |
Definition at line 166 of file internal.cc.
References Config, SquidConfig::hostnameAliases, internalHostname(), wordlist::key, and wordlist::next.
Referenced by ClientHttpRequest::checkForInternalAccess().
◆ internalLocalUri()
char * internalLocalUri | ( | const char * | dir, |
const SBuf & | name | ||
) |
Definition at line 140 of file internal.cc.
References getMyHostname(), getMyPort(), and internalRemoteUri().
Referenced by mimeGetIconURL(), ConnStateData::parseHttpRequest(), MimeIcon::setName(), and storeDigestRewriteStart().
◆ internalRemoteUri()
char * internalRemoteUri | ( | bool | encrypt, |
const char * | host, | ||
unsigned short | port, | ||
const char * | dir, | ||
const SBuf & | name | ||
) |
Definition at line 96 of file internal.cc.
References MemBuf::append(), Packable::appendf(), assert, AnyP::Uri::authority(), MemBuf::buf, encrypt(), AnyP::Uri::host(), Ip::Address::isAnyAddr(), SBuf::isEmpty(), SBuf::length(), AnyP::Uri::port(), port, AnyP::PROTO_HTTP, SBuf::rawContent(), MemBuf::reset(), SQUIDHOSTNAMELEN, SQUIDSBUFPH, SQUIDSBUFPRINT, Ip::Address::toHostStr(), Tolower(), urlAppendDomain(), and xstrncpy().
Referenced by internalLocalUri(), netdbExchangeStart(), and peerDigestRequest().
◆ internalStart()
void internalStart | ( | const Comm::ConnectionPointer & | clientConn, |
HttpRequest * | request, | ||
StoreEntry * | entry, | ||
const AccessLogEntry::Pointer & | ale | ||
) |
Definition at line 33 of file internal.cc.
References StoreEntry::append(), Assure, StoreEntry::complete(), debugObj(), debugs, ERR_INVALID_REQ, errorAppendEntry(), HttpRequest::flags, ForSomeCacheManager(), CacheManager::GetInstance(), httpRequestPack(), RequestFlags::internal, netdbBinaryExchange(), AnyP::Uri::path(), StoreEntry::replaceHttpReply(), Http::scNotFound, HttpReply::setHeaders(), squid_curtime, CacheManager::start(), and HttpRequest::url.
Referenced by FwdState::Start().
◆ internalStaticCheck()
bool internalStaticCheck | ( | const SBuf & | urlPath | ) |
Definition at line 80 of file internal.cc.
References SBuf::startsWith().
Referenced by ClientHttpRequest::checkForInternalAccess().