ErrorDetailManager.cc
Go to the documentation of this file.
31SlowlyParseQuotedField(const char * const description, const HttpHeader &parser, const char * const fieldName)
55 explicit ErrorDetailFile(ErrorDetailsList::Pointer const details): TemplateFile("error-details.txt", ERR_NONE) {
120Ssl::ErrorDetailsManager::findDetail(const Security::ErrorCode value, const HttpRequest::Pointer &request) const
224 debugs(83, DBG_IMPORTANT, "ERROR: Ignoring bad " << errorName << " detail entry: " << CurrentException);
static SBuf SlowlyParseQuotedField(const char *const description, const HttpHeader &parser, const char *const fieldName)
ErrorDetailEntry constructor helper that extracts a quoted HTTP field value.
Definition: ErrorDetailManager.cc:31
SBuf StringToSBuf(const String &s)
create a new SBuf from a String by copying contents
Definition: StringConvert.h:17
std::ostream & CurrentException(std::ostream &os)
prints active (i.e., thrown but not yet handled) exception
Definition: TextException.cc:88
Definition: ErrorDetailManager.cc:165
Definition: HttpHeader.h:75
int parse(const char *header_start, size_t len, Http::ContentLengthInterpreter &interpreter)
Definition: HttpHeader.cc:350
bool hasNamed(const SBuf &s, String *value=nullptr) const
Definition: HttpHeader.cc:866
Definition: ErrorDetailManager.h:27
ErrorDetailEntry(const SBuf &aName, const HttpHeader &)
extracts quoted detail and descr fields from the given header
Definition: ErrorDetailManager.cc:39
ErrorDetailFile(ErrorDetailsList::Pointer const details)
Definition: ErrorDetailManager.cc:55
ErrorDetailsList::Pointer theDetails
Definition: ErrorDetailManager.cc:60
Definition: ErrorDetailManager.h:42
String errLanguage
The language of the error-details.txt template, if any.
Definition: ErrorDetailManager.h:50
const ErrorDetailEntry * findRecord(Security::ErrorCode) const
Definition: ErrorDetailManager.cc:67
Definition: ErrorDetailManager.h:60
ErrorDetailsManager()
Definition: ErrorDetailManager.cc:90
ErrorDetailsList::Pointer getCachedDetails(const char *lang) const
Return cached error details list for a given language if exist.
Definition: ErrorDetailManager.cc:98
const ErrorDetailEntry * findDefaultDetail(Security::ErrorCode) const
Definition: ErrorDetailManager.cc:158
static ErrorDetailsManager * TheDetailsManager
An instance of ErrorDetailsManager to be used by squid (ssl/ErrorDetails.*)
Definition: ErrorDetailManager.h:92
void cacheDetails(const ErrorDetailsList::Pointer &errorDetails) const
cache the given error details list.
Definition: ErrorDetailManager.cc:111
const ErrorDetailEntry * findDetail(Security::ErrorCode value, const HttpRequest::Pointer &request) const
Definition: ErrorDetailManager.cc:120
Definition: SquidString.h:26
Definition: errorpage.h:281
bool strHdrAcptLangGetItem(const String &hdr, char *lang, int langLen, size_t &pos)
Definition: errorpage.cc:465
size_t headersEnd(const char *mime, size_t l, bool &containsObsFold)
Definition: mime_header.cc:17
SBuf SlowlyParseQuotedString(const char *description, const char *start, size_t length)
Definition: HttpHeaderTools.cc:238
int ErrorCode
Squid-defined error code (<0), an error code returned by X.509 API, or zero.
Definition: forward.h:132
Definition: Xaction.cc:40
Security::ErrorCode GetErrorCode(const char *name)
The Security::ErrorCode code of the error described by "name".
Definition: ErrorDetail.h:30
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63