stub_HttpReply.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #include "squid.h"
10 #include "HttpReply.h"
11 
12 #define STUB_API "HttpReply.cc"
13 #include "tests/STUB.h"
14 
16  expires(0), surrogate_control(nullptr), keep_alive(0),
17  protoPrefix("HTTP/"), do_clean(false), bodySizeMax(-2), content_range(nullptr)
18 {STUB_NOP}
20 void HttpReply::setHeaders(Http::StatusCode, const char *, const char *, int64_t, time_t, time_t) STUB
23 void HttpReply::reset() STUB
24 bool HttpReply::sanityCheckStartLine(const char *, const size_t, Http::StatusCode *) STUB_RETVAL(false)
26 bool HttpReply::expectingBody(const HttpRequestMethod&, int64_t&) const STUB_RETVAL(false)
27 size_t HttpReply::parseTerminatedPrefix(const char *, size_t) STUB_RETVAL(0)
28 size_t HttpReply::prefixLen() const STUB_RETVAL(0)
29 bool HttpReply::parseFirstLine(const char *, const char *) STUB_RETVAL(false)
31 HttpReply * HttpReply::clone() const STUB_RETVAL(nullptr)
32 bool HttpReply::inheritProperties(const Http::Message *) STUB_RETVAL(false)
34 int64_t HttpReply::bodySize(const HttpRequestMethod&) const STUB_RETVAL(0)
35 const HttpHdrContRange *HttpReply::contentRange() const STUB_RETVAL(nullptr)
36 void HttpReply::configureContentLengthInterpreter(Http::ContentLengthInterpreter &) STUB
37 
bool parseFirstLine(const char *start, const char *end) override
Definition: HttpReply.cc:457
@ hoReply
Definition: HttpHeader.h:37
bool expectingBody(const HttpRequestMethod &, int64_t &) const override
Definition: HttpReply.cc:528
RefCount< HttpReply > Pointer
Definition: HttpReply.h:29
bool do_clean
Definition: HttpReply.h:62
int64_t bodySizeMax
Definition: HttpReply.h:161
#define STUB_RETVAL(x)
Definition: STUB.h:42
int64_t bodySize(const HttpRequestMethod &) const
Definition: HttpReply.cc:377
HttpReply * clone() const override
Definition: HttpReply.cc:611
void packHeadersUsingSlowPacker(Packable &p) const
same as packHeadersUsingFastPacker() but assumes that p cannot quickly process small additions
Definition: HttpReply.cc:95
time_t last_modified
Definition: HttpReply.h:42
StatusCode
Definition: StatusCode.h:20
Definition: forward.h:17
void packHeadersUsingFastPacker(Packable &p) const
Definition: HttpReply.cc:87
time_t expires
Definition: HttpReply.h:44
void reset() override
Definition: HttpReply.cc:59
#define STUB
macro to stub a void function.
Definition: STUB.h:34
bool inheritProperties(const Http::Message *) override
Definition: HttpReply.cc:627
time_t date
Definition: HttpReply.h:40
String protoPrefix
Definition: HttpReply.h:60
size_t prefixLen() const
Definition: HttpReply.cc:495
const HttpHdrContRange * contentRange() const
Definition: HttpReply.cc:345
size_t parseTerminatedPrefix(const char *, size_t)
Definition: HttpReply.cc:463
#define STUB_NOP
Definition: STUB.h:38
~HttpReply() override
Definition: HttpReply.cc:44
bool sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error) override
Definition: HttpReply.cc:402
HttpHdrSc * surrogate_control
Definition: HttpReply.h:48
HttpHdrContRange * content_range
parsed Content-Range; nil for non-206 responses!
Definition: HttpReply.h:163
void hdrCacheInit() override
Definition: HttpReply.cc:321
Message(http_hdr_owner_type)
Definition: Message.cc:22
void setHeaders(Http::StatusCode status, const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires)
Definition: HttpReply.cc:170
void configureContentLengthInterpreter(Http::ContentLengthInterpreter &) override
configures the interpreter as needed
Definition: HttpReply.cc:501
int httpMsgParseError() override
Definition: HttpReply.cc:515
short int keep_alive
Definition: HttpReply.h:53
Pointer recreateOnNotModified(const HttpReply &reply304) const
Definition: HttpReply.cc:265

 

Introduction

Documentation

Support

Miscellaneous