|
Squid Web Cache master
|
#include <ErrorDetailManager.h>
Public Member Functions | |
| ErrorDetailsManager () | |
| const ErrorDetailEntry * | findDetail (Security::ErrorCode value, const HttpRequest::Pointer &request) const |
| const ErrorDetailEntry * | findDefaultDetail (Security::ErrorCode) const |
Static Public Member Functions | |
| static ErrorDetailsManager & | GetInstance () |
| Instance class. | |
| static void | Shutdown () |
| reset the ErrorDetailsManager instance | |
Private Types | |
| using | Cache = std::map< SBuf, ErrorDetailsList::Pointer > |
Private Member Functions | |
| ErrorDetailsList::Pointer | getCachedDetails (const char *lang) const |
| Return cached error details list for a given language if exist. | |
| void | cacheDetails (const ErrorDetailsList::Pointer &errorDetails) const |
| cache the given error details list. | |
Private Attributes | |
| Cache | cache |
| the error details list cache | |
| ErrorDetailsList::Pointer | theDefaultErrorDetails |
| the default error details list | |
Static Private Attributes | |
| static ErrorDetailsManager * | TheDetailsManager = nullptr |
| An instance of ErrorDetailsManager to be used by squid (ssl/ErrorDetails.*) | |
It is used to load, manage and query multiple ErrorDetailLists objects.
Definition at line 57 of file ErrorDetailManager.h.
|
private |
Definition at line 85 of file ErrorDetailManager.h.
| Ssl::ErrorDetailsManager::ErrorDetailsManager | ( | ) |
Definition at line 90 of file ErrorDetailManager.cc.
References TemplateFile::loadDefault().
|
private |
Definition at line 111 of file ErrorDetailManager.cc.
References Ssl::ErrorDetailsList::errLanguage.
| const Ssl::ErrorDetailEntry * Ssl::ErrorDetailsManager::findDefaultDetail | ( | Security::ErrorCode | value | ) | const |
Default error details for the given TLS error known to Squid (or, if the error is unknown, nil). Use findDetail() instead when the error is tied to a specific request.
Definition at line 157 of file ErrorDetailManager.cc.
| const Ssl::ErrorDetailEntry * Ssl::ErrorDetailsManager::findDetail | ( | Security::ErrorCode | value, |
| const HttpRequest::Pointer & | request | ||
| ) | const |
Retrieve error details for an error. This method examine the Accept-Language of the request to retrieve the error details for requested language else return the default error details.
| value | the error code |
| request | the current HTTP request. |
Definition at line 119 of file ErrorDetailManager.cc.
References Http::ACCEPT_LANGUAGE, assert, debugs, Ssl::ErrorDetailsList::errLanguage, Ssl::ErrorDetailsList::findRecord(), HttpHeader::getList(), RefCount< C >::getRaw(), Http::Message::header, TemplateFile::language(), TemplateFile::loadFor(), and strHdrAcptLangGetItem().
|
private |
Definition at line 98 of file ErrorDetailManager.cc.
References debugs.
|
static |
Definition at line 75 of file ErrorDetailManager.cc.
References assert.
Referenced by Ssl::errorDetailInitialize(), and Security::ErrorDetail::verbose().
|
static |
Definition at line 84 of file ErrorDetailManager.cc.
Referenced by Ssl::errorDetailClean().
|
mutableprivate |
Definition at line 86 of file ErrorDetailManager.h.
|
private |
Definition at line 87 of file ErrorDetailManager.h.
|
staticprivate |
Definition at line 90 of file ErrorDetailManager.h.