#include <Reply.h>
Public Member Functions | |
Reply (Helper::ResultCode res) | |
Reply () | |
Creates a NULL reply. More... | |
const MemBuf & | other () const |
void | finalize () |
bool | accumulate (const char *buf, size_t len) |
Public Attributes | |
Helper::ResultCode | result |
The helper response 'result' field. More... | |
NotePairs | notes |
Helper::ReservationId | reservationId |
The stateful replies should include the reservation ID. More... | |
Private Member Functions | |
Reply (const Helper::Reply &r) | |
Reply & | operator= (const Helper::Reply &r) |
void | parseResponseKeys () |
const MemBuf & | emptyBuf () const |
Return an empty MemBuf. More... | |
Static Private Member Functions | |
static void | CheckReceivedKey (const SBuf &, const SBuf &) |
warns admin about problematic key=value pairs More... | |
Private Attributes | |
MemBuf | other_ |
the remainder of the line More... | |
Detailed Description
This object stores the reply message from a helper lookup It provides parser routing to accept a raw buffer and process the helper reply into fields for easy access by callers
Constructor & Destructor Documentation
◆ Reply() [1/3]
|
private |
◆ Reply() [2/3]
|
inlineexplicit |
◆ Reply() [3/3]
Member Function Documentation
◆ accumulate()
bool Helper::Reply::accumulate | ( | const char * | buf, |
size_t | len | ||
) |
◆ CheckReceivedKey()
Definition at line 157 of file Reply.cc.
References DBG_IMPORTANT, debugs, Debug::Extra(), Important, SBuf::isEmpty(), and SBuf::rbegin().
◆ emptyBuf()
|
private |
Definition at line 244 of file Reply.cc.
References MemBuf::init(), and MemBuf::isNull().
Referenced by other().
◆ finalize()
void Helper::Reply::finalize | ( | ) |
parse a helper response line format: line := [ result ] *#( kv-pair ) kv-pair := OWS token '=' ( quoted-string | token )
token are URL-decoded. quoted-string are -escape decoded and the quotes are stripped.
Definition at line 39 of file Reply.cc.
References Helper::BrokenHelper, debugs, Helper::Error, Helper::Okay, strwordtok(), Helper::TT, and xisspace.
◆ operator=()
|
private |
◆ other()
|
inline |
Definition at line 42 of file Reply.h.
References emptyBuf(), MemBuf::isNull(), and other_.
Referenced by Helper::operator<<(), redirectHandleReply(), and ConnStateData::sslCrtdHandleReply().
◆ parseResponseKeys()
|
private |
Definition at line 208 of file Reply.cc.
References isKeyNameChar(), rfc1738_unescape(), strwordtok(), and xisspace.
Member Data Documentation
◆ notes
NotePairs Helper::Reply::notes |
Definition at line 62 of file Reply.h.
Referenced by ClientRequestContext::clientRedirectDone(), ClientRequestContext::clientStoreIdDone(), Auth::UserRequest::denyMessageFromHelper(), externalAclHandleReply(), Helper::operator<<(), redirectHandleReply(), redirectStart(), storeIdStart(), and Ssl::Helper::Submit().
◆ other_
◆ reservationId
Helper::ReservationId Helper::Reply::reservationId |
Definition at line 65 of file Reply.h.
Referenced by helperStatefulDispatch().
◆ result
Helper::ResultCode Helper::Reply::result |
Definition at line 59 of file Reply.h.
Referenced by ClientRequestContext::clientRedirectDone(), ClientRequestContext::clientStoreIdDone(), externalAclHandleReply(), helperStatefulDispatch(), Helper::operator<<(), redirectHandleReply(), redirectStart(), ConnStateData::sslCrtdHandleReply(), storeIdStart(), and statefulhelper::submit().
The documentation for this class was generated from the following files: