#include <Reply.h>

Collaboration diagram for Helper::Reply:

Public Member Functions

 Reply (Helper::ResultCode res)
 Reply ()
 Creates a NULL reply. More...
const MemBufother () 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)
Replyoperator= (const Helper::Reply &r)
void parseResponseKeys ()
const MemBufemptyBuf () 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

Definition at line 29 of file Reply.h.

Constructor & Destructor Documentation

◆ Reply() [1/3]

Helper::Reply::Reply ( const Helper::Reply r)

◆ Reply() [2/3]

Helper::Reply::Reply ( Helper::ResultCode  res)

Definition at line 37 of file Reply.h.

◆ Reply() [3/3]

Helper::Reply::Reply ( )

Definition at line 20 of file Reply.cc.

Member Function Documentation

◆ accumulate()

bool Helper::Reply::accumulate ( const char *  buf,
size_t  len 

Definition at line 26 of file Reply.cc.

◆ CheckReceivedKey()

void Helper::Reply::CheckReceivedKey ( const SBuf key,
const SBuf value 

Definition at line 157 of file Reply.cc.

References DBG_IMPORTANT, debugs, Debug::Extra(), Important, SBuf::isEmpty(), and SBuf::rbegin().

◆ emptyBuf()

const MemBuf & Helper::Reply::emptyBuf ( ) const

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=()

Reply & Helper::Reply::operator= ( const Helper::Reply r)

◆ other()

const MemBuf & Helper::Reply::other ( ) const

◆ parseResponseKeys()

void Helper::Reply::parseResponseKeys ( )

Definition at line 208 of file Reply.cc.

References isKeyNameChar(), rfc1738_unescape(), strwordtok(), and xisspace.

Member Data Documentation

◆ notes

◆ other_

MemBuf Helper::Reply::other_

Definition at line 75 of file Reply.h.

Referenced by other().

◆ reservationId

Helper::ReservationId Helper::Reply::reservationId

Definition at line 65 of file Reply.h.

Referenced by helperStatefulDispatch().

◆ result

The documentation for this class was generated from the following files:






Web Site Translations