File Reference
#include "squid.h"
#include "AccessLogEntry.h"
#include "cache_cf.h"
#include "clients/forward.h"
#include "comm/Connection.h"
#include "comm/Write.h"
#include "error/Detail.h"
#include "error/SysErrorDetail.h"
#include "errorpage.h"
#include "fde.h"
#include "format/Format.h"
#include "fs_io.h"
#include "html_quote.h"
#include "HttpHeaderTools.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "MemBuf.h"
#include "MemObject.h"
#include "rfc1738.h"
#include "sbuf/Stream.h"
#include "SquidConfig.h"
#include "SquidTime.h"
#include "Store.h"
#include "tools.h"
#include "wordlist.h"
#include "auth/UserRequest.h"
#include "ssl/ErrorDetailManager.h"
Include dependency graph for

Go to the source code of this file.


class  ErrorDynamicPageInfo
 an error page created from admin-configurable metadata (e.g. deny_info) More...
class  ErrorPage::Build
 state and parameters shared by several ErrorState::compile*() methods More...
class  ErrorPage::BuildErrorPrinter
 pretty-prints error page/deny_info building error More...
class  ErrorPageFile




#define CVT_BUF_SZ   512


static std::ostream & ErrorPage::operator<< (std::ostream &os, const BuildErrorPrinter &context)
static const char * ErrorPage::IsDenyInfoUri (const int page_id)
static void ErrorPage::ImportStaticErrorText (const int page_id, const char *text, const SBuf &inputLocation)
 add error page template to the global index More...
static void ErrorPage::ValidateStaticError (const int page_id, const SBuf &inputLocation)
 validate static error page More...
static const char * errorFindHardText (err_type type)
static err_typeoperator++ (err_type &anErr)
static int operator- (err_type const &anErr, err_type const &anErr2)
void errorInitialize (void)
void errorClean (void)
bool strHdrAcptLangGetItem (const String &hdr, char *lang, int langLen, size_t &pos)
static int errorPageId (const char *page_name)
err_type errorReservePageId (const char *page_name, const SBuf &cfgLocation)
 allocates a new slot for the error page More...
const char * errorPageName (int pageId)
 error ID to string More...
void errorAppendEntry (StoreEntry *entry, ErrorState *err)
void errorSend (const Comm::ConnectionPointer &conn, ErrorState *err)
static void errorSendComplete (const Comm::ConnectionPointer &conn, char *, size_t size, Comm::Flag errflag, int, void *data)
std::ostream & operator<< (std::ostream &os, const ErrorState *err)


struct {
   int   type
   const char *   text
error_hard_text []
static std::vector< ErrorDynamicPageInfo * > ErrorDynamicPages
static const int error_hard_text_count = sizeof(error_hard_text) / sizeof(*error_hard_text)
static char ** error_text = NULL
static int error_page_count = 0
static MemBuf error_stylesheet
static IOCB errorSendComplete

Macro Definition Documentation



Where to look for errors if config path fails.

Please use ./configure –datadir=/path instead of patching

Definition at line 58 of file

Function Documentation

◆ errorReservePageId()

err_type errorReservePageId ( const char *  page_name,
const SBuf cfgLocation 

Definition at line 649 of file

Referenced by AclDenyInfoList::AclDenyInfoList().

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
const ErrorState err 

Definition at line 1529 of file

References errorPageName(), and ErrorState::page_id.

◆ strHdrAcptLangGetItem()

bool strHdrAcptLangGetItem ( const String hdr,
char *  lang,
int  langLen,
size_t pos 

Parses the Accept-Language header value and return one language item on each call. Will ignore any whitespace, q-values, and detectably invalid language codes in the header.

hdris the Accept-Language header value
langa buffer to store parsed language code in
langlenthe length of the lang buffer
posis used to store the offset state of parsing. Must be "0" on first call. Will be altered to point at the start of next field-value.
true if something looking like a language token has been placed in lang, false otherwise

Definition at line 467 of file

References debugs, String::size(), String::substr(), xisspace, and xtolower.

Referenced by Ssl::ErrorDetailsManager::getErrorDetail(), Auth::SchemeConfig::isCP1251EncodingAllowed(), and TemplateFile::loadFor().

Variable Documentation

◆ errorSendComplete

IOCB errorSendComplete

Definition at line 208 of file

Referenced by errorSend().

◆ text

◆ type

int type

Definition at line 153 of file

Referenced by Security::Extension::Extension(), Auth::UserRequest::AddReplyAuthHeader(), Snmp::Var::asCounter(), Snmp::Var::asCounter64(), Snmp::Var::asGauge(), Snmp::Var::asInt(), asn_build_exception(), asn_build_header(), asn_build_header_with_truth(), asn_build_int(), asn_build_null(), asn_build_objid(), asn_build_string(), asn_build_unsigned_int(), asn_parse_header(), asn_parse_int(), asn_parse_objid(), asn_parse_string(), asn_parse_unsigned_int(), Snmp::Var::asObject(), Snmp::Var::asString(), Snmp::Var::asTimeTicks(), authenticateAuthenticateUser(), ConnStateData::borrowPinnedConnection(), cbdataInternalAddType(), cbdataInternalAlloc(), cbdataInternalInitType(), Snmp::Var::clearValue(), commSetNonBlocking(), Ssl::Bio::Create(), CreateSession(), Fs::Ufs::StoreFSufs< TheSwapDir >::createSwapDir(), doTlsHandshake(), Format::Format::dump(), errorFindHardText(), StoreMeta::Factory(), fd_bytes(), find_proxy_auth(), fqdncacheParse(), HttpHeader::getETag(), HttpHeader::getInt(), HttpHeader::getInt64(), HttpHeader::getLastStr(), getoid(), HttpHeader::getStr(), GetStrPool(), HttpHeader::getTime(), HttpHeader::getTimeOrTag(), PeerSelector::handleHtcpReply(), PeerSelector::handleIcpReply(), ipc_thread_1(), ipc_thread_2(), ipcacheParse(), ipcCreate(), Snmp::Var::isNull(), Security::HandshakeParser::isSslv2Record(), MimeIcon::load(), Icmp::Log(), main(), HappyConnOpener::makeError(), memAllocate(), memAllocBuf(), memDataInit(), memFindBufSizeType(), memFree(), memFreeBuf(), memInUse(), mimeInit(), ConfigParser::CfgFile::nextElement(), ConfigParser::NextElement(), ntlm_validate_packet(), Snmp::Var::operator+=(), Snmp::Var::operator/=(), Snmp::Var::operator<(), Snmp::Var::operator>(), Mgr::IntParam::pack(), Mgr::StringParam::pack(), Snmp::Var::pack(), Format::Token::parse(), HttpHdrCc::parse(), HttpHdrSc::parse(), parse(), ConfigParser::CfgFile::parse(), parse_asntype(), parse_hostdomaintype(), parse_objectid(), parse_objecttype(), ProxyProtocol::Two::ParseTLVs(), peer_type_str(), print_error(), HttpHeader::putInt(), HttpHeader::putInt64(), HttpHeader::putStr(), HttpHeader::putTime(), rfc1035QuestionPack(), Format::Token::scanForToken(), Comm::SetSelect(), Ip::Qos::setSockTos(), Snmp::Var::setValue(), snmp_msg_Decode(), snmp_var_new_integer(), snmpAggrType(), Store::Disk::stat(), storeReplAdd(), Security::Extension::supported(), ConfigParser::TokenParse(), unlinkdInit(), Mgr::QueryParams::unpack(), Snmp::Var::unpack(), StoreMeta::validType(), verifyByCA(), WIN32_StoreKey(), xprof_start(), and xprof_stop().






Web Site Translations