2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
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.
10 #include "client_side.h"
11 #include "comm/Connection.h"
12 #include "SquidConfig.h"
14 #define STUB_API "http/libhttp.la"
17 #include "http/ContentLengthInterpreter.h"
20 // XXX: use C++11 initialization for this class
21 Http::ContentLengthInterpreter::ContentLengthInterpreter():
23 headerWideProblem(nullptr),
24 debugLevel(Config
.onoff
.relaxed_header_parser
<= 0 ? DBG_IMPORTANT
: 2),
26 needsSanitizing(false),
28 prohibitedAndIgnored_(nullptr)
31 bool ContentLengthInterpreter::checkField(const String
&) STUB_RETVAL(false)
32 bool ContentLengthInterpreter::goodSuffix(const char *, const char * const) const STUB_RETVAL(false)
33 bool ContentLengthInterpreter::checkValue(const char *, const int) STUB_RETVAL(false)
34 bool ContentLengthInterpreter::checkList(const String
&) STUB_RETVAL(false)
37 #include "http/Message.h"
40 Message::Message(http_hdr_owner_type
) {STUB
}
41 Message::~Message() {STUB
}
42 void Message::packInto(Packable
*, bool) const STUB
43 void Message::setContentLength(int64_t) STUB
44 bool Message::persistent() const STUB_RETVAL(false)
45 void Message::putCc(const HttpHdrCc
*) STUB
46 bool Message::parse(const char *, const size_t, bool, Http::StatusCode
*) STUB_RETVAL(false)
47 bool Message::parseCharBuf(const char *, ssize_t
) STUB_RETVAL(false)
48 int Message::httpMsgParseStep(const char *, int, int) STUB_RETVAL(-1)
49 int Message::httpMsgParseError() STUB_RETVAL(0)
50 void Message::firstLineBuf(MemBuf
&) STUB
51 void Message::hdrCacheInit() STUB
52 bool Message::parseHeader(Http1::Parser
&, Http::ContentLengthInterpreter
&) STUB_RETVAL(false)
55 #include "http/MethodType.h"
58 const SBuf MethodType_sb
[1] = {SBuf()};
61 #include "http/RegisteredHeaders.h"
64 HeaderTableRecord::HeaderTableRecord() {STUB_NOP
}
65 HeaderTableRecord::HeaderTableRecord(const char *) {STUB_NOP
}
66 HeaderTableRecord::HeaderTableRecord(const char *, Http::HdrType
, Http::HdrFieldType
, int) {STUB
}
67 HeaderLookupTable_t::HeaderLookupTable_t() {STUB_NOP
}
68 const HeaderTableRecord
& HeaderLookupTable_t::lookup(const char *, const std::size_t) const STUB_RETVAL(BadHdr
)
69 const HeaderLookupTable_t HeaderLookupTable
;
71 std::ostream
&operator<< (std::ostream
&os
, Http::HdrType
) STUB_RETVAL(os
)
73 #include "http/RequestMethod.h"
74 HttpRequestMethod::HttpRequestMethod(const SBuf
&) {STUB
}
75 void HttpRequestMethod::HttpRequestMethodXXX(char const *) STUB
76 const SBuf
&HttpRequestMethod::image() const STUB_RETVAL(theImage
)
77 bool HttpRequestMethod::isHttpSafe() const STUB_RETVAL(false)
78 bool HttpRequestMethod::isIdempotent() const STUB_RETVAL(false)
79 bool HttpRequestMethod::respMaybeCacheable() const STUB_RETVAL(false)
80 bool HttpRequestMethod::shouldInvalidate() const STUB_RETVAL(false)
81 bool HttpRequestMethod::purgesOthers() const STUB_RETVAL(false)
83 #include "http/StatusCode.h"
86 const char *StatusCodeString(const Http::StatusCode
) STUB_RETVAL(nullptr)
89 #include "http/StatusLine.h"
92 void StatusLine::init() STUB
93 void StatusLine::clean() STUB
94 void StatusLine::set(const AnyP::ProtocolVersion
&, Http::StatusCode
, const char *) STUB
95 const char *StatusLine::reason() const STUB_RETVAL(nullptr)
96 void StatusLine::packInto(Packable
*) const STUB
97 bool StatusLine::parse(const String
&, const char *, const char *) STUB_RETVAL(false)
100 #include "http/Stream.h"
103 Stream::Stream(const Comm::ConnectionPointer
&, ClientHttpRequest
*) {STUB
}
104 Stream::~Stream() {STUB
}
105 void Stream::registerWithConn() STUB
106 bool Stream::startOfOutput() const STUB
107 void Stream::writeComplete(size_t) STUB
108 void Stream::pullData() STUB
109 bool Stream::multipartRangeRequest() const STUB_RETVAL(false)
110 int64_t Stream::getNextRangeOffset() const STUB_RETVAL(-1)
111 bool Stream::canPackMoreRanges() const STUB_RETVAL(false)
112 size_t Stream::lengthToSend(Range
<int64_t> const &) const STUB_RETVAL(0)
113 clientStream_status_t
Stream::socketState() STUB_RETVAL(STREAM_NONE
)
114 void Stream::sendStartOfMessage(HttpReply
*, StoreIOBuffer
) STUB
115 void Stream::sendBody(StoreIOBuffer
) STUB
116 void Stream::noteSentBodyBytes(size_t) STUB
117 void Stream::buildRangeHeader(HttpReply
*) STUB
118 clientStreamNode
*Stream::getTail() const STUB_RETVAL(nullptr)
119 clientStreamNode
*Stream::getClientReplyContext() const STUB_RETVAL(nullptr)
120 ConnStateData
*Stream::getConn() const STUB_RETVAL(nullptr)
121 void Stream::noteIoError(const int) STUB
122 void Stream::finished() STUB
123 void Stream::initiateClose(const char *) STUB
124 void Stream::deferRecipientForLater(clientStreamNode
*, HttpReply
*, StoreIOBuffer
) STUB