#include <HttpHeaderRange.h>

Collaboration diagram for HttpHdrRange:

Public Types

typedef std::vector< HttpHdrRangeSpec * >::iterator iterator
typedef std::vector< HttpHdrRangeSpec * >::const_iterator const_iterator

Public Member Functions

 HttpHdrRange ()
 HttpHdrRange (HttpHdrRange const &)
 ~HttpHdrRange ()
HttpHdrRangeoperator= (HttpHdrRange const &)
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
int canonize (int64_t)
int canonize (HttpReply *rep)
bool parseInit (const String *range_spec)
void packInto (Packable *p) const
bool isComplex () const
bool willBeComplex () const
int64_t firstOffset () const
int64_t lowestOffset (int64_t) const
bool offsetLimitExceeded (const int64_t limit) const

Static Public Member Functions

static HttpHdrRangeParseCreate (const String *range_spec)

Public Attributes

std::vector< HttpHdrRangeSpec * > specs

Static Public Attributes

static size_t ParsedCount = 0

Private Member Functions

void getCanonizedSpecs (std::vector< HttpHdrRangeSpec * > &copy)
void merge (std::vector< HttpHdrRangeSpec * > &basis)

Private Attributes

int64_t clen

Detailed Description

There may be more than one byte range specified in the request. This object holds all range specs in order of their appearance in the request because we SHOULD preserve that order.

Definition at line 51 of file HttpHeaderRange.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 66 of file HttpHeaderRange.h.

◆ iterator

Definition at line 65 of file HttpHeaderRange.h.

Constructor & Destructor Documentation

◆ HttpHdrRange() [1/2]

HttpHdrRange::HttpHdrRange ( )

Definition at line 206 of file HttpHdrRange.cc.

Referenced by ParseCreate().

◆ HttpHdrRange() [2/2]

HttpHdrRange::HttpHdrRange ( HttpHdrRange const &  old)

Definition at line 271 of file HttpHdrRange.cc.

References assert, begin(), end(), and specs.

◆ ~HttpHdrRange()

HttpHdrRange::~HttpHdrRange ( )

Definition at line 263 of file HttpHdrRange.cc.

References specs.

Member Function Documentation

◆ begin() [1/2]

◆ begin() [2/2]

HttpHdrRange::const_iterator HttpHdrRange::begin ( ) const

Definition at line 296 of file HttpHdrRange.cc.

References specs.

◆ canonize() [1/2]

int HttpHdrRange::canonize ( HttpReply rep)

◆ canonize() [2/2]

int HttpHdrRange::canonize ( int64_t  newClen)

Definition at line 386 of file HttpHdrRange.cc.

References clen, debugs, getCanonizedSpecs(), merge(), and specs.

Referenced by canonize(), and testRangeCanonization().

◆ end() [1/2]

◆ end() [2/2]

HttpHdrRange::const_iterator HttpHdrRange::end ( ) const

Definition at line 302 of file HttpHdrRange.cc.

References specs.

◆ firstOffset()

int64_t HttpHdrRange::firstOffset ( ) const

Definition at line 459 of file HttpHdrRange.cc.

References begin(), end(), known_spec, and HttpHdrRangeSpec::UnknownPosition.

Referenced by offsetLimitExceeded().

◆ getCanonizedSpecs()

void HttpHdrRange::getCanonizedSpecs ( std::vector< HttpHdrRangeSpec * > &  copy)

Definition at line 349 of file HttpHdrRange.cc.

References begin(), clen, debugs, end(), and specs.

Referenced by canonize().

◆ isComplex()

bool HttpHdrRange::isComplex ( ) const

Definition at line 402 of file HttpHdrRange.cc.

References assert, begin(), and end().

◆ lowestOffset()

int64_t HttpHdrRange::lowestOffset ( int64_t  size) const

Definition at line 481 of file HttpHdrRange.cc.

References begin(), end(), known_spec, size, and HttpHdrRangeSpec::UnknownPosition.

Referenced by clientInterpretRequestHeaders().


HttpHdrRange::MEMPROXY_CLASS ( HttpHdrRange  )

◆ merge()

void HttpHdrRange::merge ( std::vector< HttpHdrRangeSpec * > &  basis)

Definition at line 323 of file HttpHdrRange.cc.

References debugs, and specs.

Referenced by canonize().

◆ offsetLimitExceeded()

bool HttpHdrRange::offsetLimitExceeded ( const int64_t  limit) const

Definition at line 510 of file HttpHdrRange.cc.

References firstOffset().

Referenced by HttpStateData::decideIfWeDoRanges().

◆ operator=()

HttpHdrRange & HttpHdrRange::operator= ( HttpHdrRange const &  )

◆ packInto()

void HttpHdrRange::packInto ( Packable p) const

Definition at line 308 of file HttpHdrRange.cc.

References Packable::append(), begin(), and end().

Referenced by HttpHeader::putRange().

◆ ParseCreate()

HttpHdrRange * HttpHdrRange::ParseCreate ( const String range_spec)

Definition at line 210 of file HttpHdrRange.cc.

References HttpHdrRange(), and parseInit().

Referenced by HttpHeader::getRange(), rangeFromString(), and testRangeParser().

◆ parseInit()

bool HttpHdrRange::parseInit ( const String range_spec)

◆ willBeComplex()

bool HttpHdrRange::willBeComplex ( ) const

Definition at line 428 of file HttpHdrRange.cc.

References assert, begin(), end(), and known_spec.

Member Data Documentation

◆ clen

int64_t HttpHdrRange::clen

Definition at line 89 of file HttpHeaderRange.h.

Referenced by canonize(), and getCanonizedSpecs().

◆ ParsedCount

size_t HttpHdrRange::ParsedCount = 0

Definition at line 56 of file HttpHeaderRange.h.

Referenced by parseInit().

◆ specs

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






Web Site Translations