#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_stateful_server
 for stateful replies the responding helper 'server' needs to be preserved across callbacks More...

Private Member Functions

 Reply (const Helper::Reply &r)
Replyoperator= (const Helper::Reply &r)
void parseResponseKeys ()
const MemBufemptyBuf () const
 Return an empty MemBuf. 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 28 of file Reply.h.

Constructor & Destructor Documentation

Helper::Reply::Reply ( const Helper::Reply r)
Helper::Reply::Reply ( Helper::ResultCode  res)

Definition at line 36 of file Reply.h.

Helper::Reply::Reply ( )

Definition at line 19 of file Reply.cc.

Member Function Documentation

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

Definition at line 26 of file Reply.cc.

References len.

Referenced by helper_server::checkForTimedOutRequests(), and helperStatefulHandleRead().

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

Definition at line 188 of file Reply.cc.

References MemBuf::init(), and MemBuf::isNull().

Referenced by other().

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, len, NULL, Helper::Okay, p, strwordtok(), Helper::TT, and xisspace.

Referenced by helper_server::checkForTimedOutRequests(), and helperStatefulHandleRead().

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

Definition at line 41 of file Reply.h.

References emptyBuf(), MemBuf::isNull(), and other_.

Referenced by operator<<(), redirectHandleReply(), and ConnStateData::sslCrtdHandleReply().

void Helper::Reply::parseResponseKeys ( )

Definition at line 156 of file Reply.cc.

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

Member Data Documentation

MemBuf Helper::Reply::other_

Definition at line 73 of file Reply.h.

Referenced by other().

CbcPointer<helper_stateful_server> Helper::Reply::whichServer

Definition at line 64 of file Reply.h.

Referenced by helperStatefulDispatch(), and helperStatefulHandleRead().

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






Web Site Translations