11#ifndef SQUID_SRC_ERRORPAGE_H
12#define SQUID_SRC_ERRORPAGE_H
30typedef void ERCB(
int fd,
void *,
size_t);
144 SBuf compile(
const char *input,
bool building_deny_info_url,
bool allowRecursion);
209 void noteBuildError_(
const char *msg,
const char *errorLocation,
bool forceBypass);
320 virtual bool parse() {
return true; }
#define CBDATA_CLASS(type)
state and parameters shared by several ErrorState::compile*() methods
static ErrorState * NewForwarding(err_type, HttpRequestPointer &, const AccessLogEntryPointer &)
Creates a general request forwarding error with the right http_status.
SBuf compile(const char *input, bool building_deny_info_url, bool allowRecursion)
void validate()
ensures that a future BuildHttpReply() is likely to succeed
void compileLegacyCode(Build &build)
compile a single-letter code like D
void noteBuildError_(const char *msg, const char *errorLocation, bool forceBypass)
AccessLogEntryPointer ale
transaction details (or nil)
std::optional< SBuf > dnsError
DNS lookup error message.
void bypassBuildErrorXXX(const char *const msg, const char *const errorLocation)
ErrorDetail::Pointer detail
void detailError(const ErrorDetail::Pointer &dCode)
set error type-specific detail code
void compileLogformatCode(Build &build)
compile @Squid{code} sequence containing a single logformat code
Auth::UserRequest::Pointer auth_user_request
SBuf inputLocation
the source of the error template (for reporting purposes)
static const SBuf LogformatMagic
marks each embedded logformat entry
HttpRequestPointer request
SBuf compileBody(const char *text, bool allowRecursion)
HttpReply * BuildHttpReply(void)
struct ErrorState::@47 ftp
SBuf buildBody()
locates the right error page template for this error and compiles it
HttpReplyPointer response_
Http::StatusCode httpStatus
void noteBuildError(const char *const msg, const char *const errorLocation)
char const * termedBuf() const
virtual void setDefault()
recover from loadDefault() failure to load or parse() a template
bool loadFromFile(const char *path)
SBuf template_
raw template contents
SBuf filename
where the template was loaded from
bool loaded() const
return true if the data loaded from disk without any problem
bool wasLoaded
True if the template data read from disk without any problem.
bool tryLoadTemplate(const char *lang)
String templateName
The name of the template.
const char * language()
The language used for the template.
virtual bool parse()
post-process the loaded template
err_type templateCode
The internal code for this template.
String errLanguage
The error language of the template.
bool silent
Whether to print error messages on cache.log file or not. It is user defined.
bool loadFor(const HttpRequest *request)
void ERCB(int fd, void *, size_t)
error page callback
err_type errorReservePageId(const char *page_name, const SBuf &cfgLocation)
allocates a new slot for the error page
std::ostream & operator<<(std::ostream &, const ErrorState *)
bool strHdrAcptLangGetItem(const String &hdr, char *lang, int langLen, size_t &pos)
void errorInitialize(void)
void errorSend(const Comm::ConnectionPointer &conn, ErrorState *err)
void errorAppendEntry(StoreEntry *entry, ErrorState *err)
const char * errorPageName(int pageId)
error ID to string
SBuf text("GET http://resource.com/path HTTP/1.1\r\n" "Host: resource.com\r\n" "Cookie: laijkpk3422r j1noin \r\n" "\r\n")