HttpReply.cc
Go to the documentation of this file.
131 static const Http::HdrType ImsEntries[] = {Http::HdrType::DATE, Http::HdrType::CONTENT_TYPE, Http::HdrType::EXPIRES, Http::HdrType::LAST_MODIFIED, /* eof */ Http::HdrType::OTHER};
438 debugs(58, 3, "missing protocol version numbers (ie. " << protoPrefix << "/1.0) in '" << buf << "'");
486 debugs(58, 3, "need more bytes after accumulating " << bufSize << " out of " << Config.maxReplyHeaderSize);
constexpr bool Less(const A a, const B b)
whether integer a is less than integer b, with correct overflow handling
Definition: SquidMath.h:48
void error(char *format,...)
Definition: FilledChecklist.h:32
Definition: HttpHdrContRange.h:18
Definition: HttpHeader.h:51
Definition: HttpHeader.h:75
HttpHeaderEntry * findEntry(Http::HdrType id) const
Definition: HttpHeader.cc:603
void packInto(Packable *p, bool mask_sensitive_info=false) const
Definition: HttpHeader.cc:540
Definition: HttpReply.h:25
bool parseFirstLine(const char *start, const char *end) override
Definition: HttpReply.cc:457
size_t parseTerminatedPrefix(const char *, size_t)
Definition: HttpReply.cc:463
HttpHdrContRange * content_range
parsed Content-Range; nil for non-206 responses!
Definition: HttpReply.h:163
void configureContentLengthInterpreter(Http::ContentLengthInterpreter &) override
configures the interpreter as needed
Definition: HttpReply.cc:501
bool expectingBody(const HttpRequestMethod &, int64_t &) const override
Definition: HttpReply.cc:528
void setHeaders(Http::StatusCode status, const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires)
Definition: HttpReply.cc:170
bool inheritProperties(const Http::Message *) override
Definition: HttpReply.cc:629
void calcMaxBodySize(HttpRequest &request) const
Definition: HttpReply.cc:586
void removeIrrelevantContentLength()
Some response status codes prohibit sending Content-Length (RFC 7230 section 3.3.2).
Definition: HttpReply.cc:648
bool receivedBodyTooLarge(HttpRequest &, int64_t receivedBodySize)
Definition: HttpReply.cc:557
bool sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error) override
Definition: HttpReply.cc:402
int validatorsMatch(HttpReply const *other) const
Definition: HttpReply.cc:223
void packHeadersUsingSlowPacker(Packable &p) const
same as packHeadersUsingFastPacker() but assumes that p cannot quickly process small additions
Definition: HttpReply.cc:95
void packHeadersUsingFastPacker(Packable &p) const
Definition: HttpReply.cc:87
Pointer recreateOnNotModified(const HttpReply &reply304) const
Definition: HttpReply.cc:265
bool expectedBodyTooLarge(HttpRequest &request)
Definition: HttpReply.cc:565
static HttpReplyPointer MakeConnectionEstablished()
construct and return an HTTP/200 (Connection Established) response
Definition: HttpReply.cc:121
Definition: RequestMethod.h:27
Definition: HttpRequest.h:49
void applyStatusCodeRules(const StatusCode code)
prohibits Content-Length in 1xx and 204 responses
Definition: ContentLengthInterpreter.h:31
bool parse(const char *buf, const size_t sz, bool eol, Http::StatusCode *error)
Definition: Message.cc:68
Definition: Parser.h:41
bool parse(const String &protoPrefix, const char *start, const char *end)
Definition: StatusLine.cc:124
AnyP::ProtocolVersion version
breakdown of protocol version label: (HTTP/ICY) and (0.9/1.0/1.1)
Definition: StatusLine.h:65
void set(const AnyP::ProtocolVersion &newVersion, Http::StatusCode newStatus, const char *newReason=nullptr)
Definition: StatusLine.cc:35
Http::StatusCode status() const
retrieve the status code for this status line
Definition: StatusLine.h:45
Definition: MemBuf.h:24
Definition: Packable.h:53
virtual void append(const char *buf, int size)=0
Appends a c-string to existing packed data.
struct SquidConfig::@106 onoff
Definition: SquidString.h:26
char const * visible_appname_string
Definition: forward.h:18
bool ProhibitsContentLength(const StatusCode sc)
whether this response status code prohibits sending Content-Length
Definition: StatusCode.h:96
AnyP::ProtocolVersion ProtocolVersion(unsigned int aMajor, unsigned int aMinor)
HTTP version label information.
Definition: ProtocolVersion.h:19
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63
@ two
@ one