#include <HttpHeaderRange.h>
Public Types | |
typedef std::vector< HttpHdrRangeSpec * >::iterator | iterator |
typedef std::vector< HttpHdrRangeSpec * >::const_iterator | const_iterator |
Public Member Functions | |
HttpHdrRange () | |
HttpHdrRange (HttpHdrRange const &) | |
~HttpHdrRange () | |
HttpHdrRange & | operator= (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 HttpHdrRange * | ParseCreate (const String *range_spec) |
Public Attributes | |
std::vector< HttpHdrRangeSpec * > | specs |
Static Public Attributes | |
static size_t | ParsedCount = 0 |
Private Member Functions | |
MEMPROXY_CLASS (HttpHdrRange) | |
void | getCanonizedSpecs (std::vector< HttpHdrRangeSpec * > ©) |
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
typedef std::vector<HttpHdrRangeSpec*>::const_iterator HttpHdrRange::const_iterator |
Definition at line 66 of file HttpHeaderRange.h.
◆ iterator
typedef std::vector<HttpHdrRangeSpec*>::iterator HttpHdrRange::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 | ) |
◆ ~HttpHdrRange()
HttpHdrRange::~HttpHdrRange | ( | ) |
Definition at line 263 of file HttpHdrRange.cc.
References specs.
Member Function Documentation
◆ begin() [1/2]
HttpHdrRange::iterator HttpHdrRange::begin | ( | ) |
Definition at line 284 of file HttpHdrRange.cc.
References specs.
Referenced by HttpHdrRange(), firstOffset(), getCanonizedSpecs(), isComplex(), lowestOffset(), ClientHttpRequest::mRangeCLen(), packInto(), ClientHttpRequest::prepPartialResponseGeneration(), testRangeIter(), testRangeParser(), and willBeComplex().
◆ begin() [2/2]
HttpHdrRange::const_iterator HttpHdrRange::begin | ( | ) | const |
Definition at line 296 of file HttpHdrRange.cc.
References specs.
◆ canonize() [1/2]
Definition at line 373 of file HttpHdrRange.cc.
References assert, canonize(), clen, Http::Message::content_length, HttpReply::contentRange(), and HttpHdrContRange::elength.
◆ 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]
HttpHdrRange::iterator HttpHdrRange::end | ( | ) |
Definition at line 290 of file HttpHdrRange.cc.
References specs.
Referenced by HttpHdrRange(), firstOffset(), getCanonizedSpecs(), isComplex(), lowestOffset(), ClientHttpRequest::mRangeCLen(), packInto(), ClientHttpRequest::prepPartialResponseGeneration(), testRangeIter(), and willBeComplex().
◆ 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()
|
private |
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.
◆ 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().
◆ MEMPROXY_CLASS()
|
private |
◆ merge()
|
private |
Definition at line 323 of file HttpHdrRange.cc.
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()
|
static |
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 | ) |
Definition at line 224 of file HttpHdrRange.cc.
References assert, String::caseCmp(), HttpHdrRangeSpec::Create(), debugs, ParsedCount, specs, strListGetItem(), and String::termedBuf().
Referenced by ParseCreate().
◆ willBeComplex()
bool HttpHdrRange::willBeComplex | ( | ) | const |
Definition at line 428 of file HttpHdrRange.cc.
References assert, begin(), end(), and known_spec.
Member Data Documentation
◆ clen
|
private |
Definition at line 89 of file HttpHeaderRange.h.
Referenced by canonize(), and getCanonizedSpecs().
◆ ParsedCount
|
static |
Definition at line 56 of file HttpHeaderRange.h.
Referenced by parseInit().
◆ specs
std::vector<HttpHdrRangeSpec *> HttpHdrRange::specs |
Definition at line 84 of file HttpHeaderRange.h.
Referenced by HttpHdrRange(), ~HttpHdrRange(), begin(), canonize(), end(), getCanonizedSpecs(), merge(), HttpRequest::multipartRangeRequest(), parseInit(), ClientHttpRequest::prepPartialResponseGeneration(), testRangeCanonization(), testRangeIter(), and testRangeParser().
The documentation for this class was generated from the following files:
- src/HttpHeaderRange.h
- src/HttpHdrRange.cc