#include "squid.h"
#include "AccessLogEntry.h"
#include "base/CharacterSet.h"
#include "base/IoManip.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/Quoting.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 "Store.h"
#include "tools.h"
#include "wordlist.h"
#include "auth/UserRequest.h"
#include "ssl/ErrorDetailManager.h"
#include <array>
![](errorpage_8cc__incl.png)
Go to the source code of this file.
Classes | |
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 | HardCodedError |
an error page (or a part of an error page) with hard-coded template text More... | |
class | ErrorPageFile |
Namespaces | |
ErrorPage | |
Macros | |
#define | DEFAULT_SQUID_ERROR_DIR DEFAULT_SQUID_DATA_DIR"/errors" |
#define | CVT_BUF_SZ 512 |
Functions | |
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_type & | operator++ (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... | |
static std::ostream & | operator<< (std::ostream &os, const ErrorState &err) |
compactly prints top-level ErrorState information (for debugging) 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) |
Variables | |
static const std::array< HardCodedError, 7 > | HardCodedErrors |
error messages that cannot be configured/customized externally More... | |
static std::vector< ErrorDynamicPageInfo * > | ErrorDynamicPages |
static char ** | error_text = nullptr |
static int | error_page_count = 0 |
static MemBuf | error_stylesheet |
static IOCB | errorSendComplete |
Macro Definition Documentation
◆ DEFAULT_SQUID_ERROR_DIR
#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 61 of file errorpage.cc.
Function Documentation
◆ errorReservePageId()
Definition at line 654 of file errorpage.cc.
References ERR_MAX, ERR_NONE, ErrorDynamicPages, and errorPageId().
Referenced by AclDenyInfoList::AclDenyInfoList().
◆ operator<<() [1/2]
|
static |
Definition at line 682 of file errorpage.cc.
References errorPageName(), ErrorState::httpStatus, Http::scNone, and ErrorState::type.
◆ operator<<() [2/2]
std::ostream& operator<< | ( | std::ostream & | os, |
const ErrorState * | err | ||
) |
Definition at line 1567 of file errorpage.cc.
References RawPointer().
◆ strHdrAcptLangGetItem()
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
-
hdr is the Accept-Language header value lang a buffer to store parsed language code in langlen the length of the lang buffer pos is 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 472 of file errorpage.cc.
References debugs, String::size(), String::substr(), xisspace, and xtolower.
Referenced by Ssl::ErrorDetailsManager::findDetail(), Auth::SchemeConfig::isCP1251EncodingAllowed(), and TemplateFile::loadFor().
Variable Documentation
◆ errorSendComplete
|
static |
Definition at line 215 of file errorpage.cc.
Referenced by errorSend().
◆ HardCodedErrors
|
static |
Definition at line 162 of file errorpage.cc.
Referenced by errorFindHardText().
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products