errorpage.cc File Reference
#include "squid.h"
#include "cache_cf.h"
#include "clients/forward.h"
#include "comm/Connection.h"
#include "comm/Write.h"
#include "err_detail_type.h"
#include "errorpage.h"
#include "fde.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 "SquidConfig.h"
#include "Store.h"
#include "tools.h"
#include "URL.h"
#include "wordlist.h"
#include "auth/UserRequest.h"
#include "SquidTime.h"
#include "ssl/ErrorDetailManager.h"
Include dependency graph for errorpage.cc:

Go to the source code of this file.

Classes

struct  ErrorDynamicPageInfo
 
class  ErrorPageFile
 

Macros

#define DEFAULT_SQUID_ERROR_DIR   DEFAULT_SQUID_DATA_DIR"/errors"
 
#define CVT_BUF_SZ   512
 

Functions

static const char * errorFindHardText (err_type type)
 
static ErrorDynamicPageInfoerrorDynamicPageInfoCreate (int id, const char *page_name)
 
static void errorDynamicPageInfoDestroy (ErrorDynamicPageInfo *info)
 
err_typeoperator++ (err_type &anErr)
 
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 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)
 

Variables

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

#define DEFAULT_SQUID_ERROR_DIR   DEFAULT_SQUID_DATA_DIR"/errors"

Where to look for errors if config path fails.

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

Definition at line 55 of file errorpage.cc.

Referenced by TemplateFile::tryLoadTemplate().

Function Documentation

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.

Parameters
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.
Returns
true if something looking like a language token has been placed in lang, false otherwise

Definition at line 361 of file errorpage.cc.

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

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

Variable Documentation

IOCB errorSendComplete
static

Definition at line 120 of file errorpage.cc.

int type

Definition at line 79 of file errorpage.cc.

Referenced by Auth::UserRequest::AddReplyAuthHeader(), Snmp::Var::asCounter(), Snmp::Var::asCounter64(), Snmp::Var::asGauge(), Snmp::Var::asInt(), asn_build_header_with_truth(), Snmp::Var::asObject(), Snmp::Var::asString(), Snmp::Var::asTimeTicks(), cbdataInternalAddType(), cbdataInternalAlloc(), cbdataInternalInitType(), Ipc::TypedMsgHdr::checkType(), Snmp::Var::clearValue(), commSetNonBlocking(), Fs::Ufs::StoreFSufs< TheSwapDir >::createSwapDir(), Format::Format::dump(), Security::Extension::Extension(), fd_open(), find_fstype(), fqdncacheParse(), HttpHeader::getETag(), HttpHeader::getInt(), HttpHeader::getInt64(), HttpHeader::getLastStr(), getoid(), GetPool(), HttpHeader::getStr(), GetStrPool(), HttpHeader::getTime(), HttpHeader::getTimeOrTag(), ipc_thread_1(), ipc_thread_2(), ipcacheParse(), ipcCreate(), Snmp::Var::isNull(), Security::HandshakeParser::isSslv2Record(), MimeIcon::load(), main(), memAllocBuf(), memAllocString(), memFindBufSizeType(), memFindStringSizeType(), memFreeBuf(), memFreeString(), mimeInit(), Snmp::Var::operator+=(), Snmp::Var::operator/=(), Snmp::Var::operator<(), Snmp::Var::operator>(), Mgr::IntParam::pack(), Mgr::StringParam::pack(), Snmp::Var::pack(), HttpHdrSc::parse(), Format::Token::parse(), HttpHdrCc::parse(), parse(), parse_asntype(), parse_hostdomaintype(), parse_objectid(), parse_objecttype(), peerHandleHtcpReply(), peerHandleIcpReply(), HttpHeader::putInt(), HttpHeader::putInt64(), HttpHeader::putStr(), HttpHeader::putTime(), Format::Token::scanForToken(), Snmp::Var::setValue(), snmp_msg_Decode(), snmp_var_new_integer(), snmpAggrType(), Store::Disk::stat(), storeReplAdd(), Security::Extension::supported(), unlinkdInit(), Mgr::QueryParams::unpack(), Snmp::Var::unpack(), verifyByCA(), ps_state::wantsMoreDestinations(), xprof_start(), and xprof_stop().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors