#include "cbdata.h"
#include "comm/forward.h"
#include "error/Detail.h"
#include "error/forward.h"
#include "http/forward.h"
#include "http/StatusCode.h"
#include "ip/Address.h"
#include "log/forward.h"
#include "sbuf/SBuf.h"
#include "SquidString.h"
#include "auth/UserRequest.h"
#include <optional>
Go to the source code of this file.
Classes | |
class | ErrorState |
class | TemplateFile |
Namespaces | |
namespace | ErrorPage |
Typedefs | |
typedef void | ERCB(int fd, void *, size_t) |
error page callback More... | |
Functions | |
void | errorInitialize (void) |
void | errorClean (void) |
void | errorSend (const Comm::ConnectionPointer &conn, ErrorState *err) |
void | errorAppendEntry (StoreEntry *entry, ErrorState *err) |
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... | |
bool | strHdrAcptLangGetItem (const String &hdr, char *lang, int langLen, size_t &pos) |
std::ostream & | operator<< (std::ostream &, const ErrorState *) |
Typedef Documentation
◆ ERCB
Definition at line 30 of file errorpage.h.
Function Documentation
◆ errorReservePageId()
Definition at line 647 of file errorpage.cc.
References ERR_MAX, ERR_NONE, ErrorDynamicPages, and errorPageId().
Referenced by AclDenyInfoList::AclDenyInfoList().
◆ operator<<()
std::ostream & operator<< | ( | std::ostream & | os, |
const ErrorState * | err | ||
) |
Definition at line 1528 of file errorpage.cc.
References errorPageName(), and ErrorState::page_id.
◆ 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 465 of file errorpage.cc.
References debugs, String::size(), String::substr(), xisspace, and xtolower.
Referenced by Ssl::ErrorDetailsManager::findDetail(), Auth::SchemeConfig::isCP1251EncodingAllowed(), and TemplateFile::loadFor().