Http1Server.cc
Go to the documentation of this file.
164 setReplyError(context, request, ERR_UNSUP_HTTPVERSION, Http::scHttpVersionNotSupported, requestErrorBytes);
203Http::One::Server::setReplyError(Http::StreamPointer &context, HttpRequest::Pointer &request, err_type requestError, Http::StatusCode errStatusCode, const char *requestErrorBytes)
215 repContext->setReplyToError(requestError, errStatusCode, context->http->uri, this, nullptr, requestErrorBytes, nullptr);
267 ACLFilledChecklist bodyContinuationCheck(Config.accessList.forceRequestBodyContinuation, request.getRaw(), nullptr);
278 const AsyncCall::Pointer cb = asyncCall(11, 3, "Http1::Server::proceedAfterBodyContinuation", CbDialer(this, &Http1::Server::proceedAfterBodyContinuation, Http::StreamPointer(context)));
RefCount< AsyncCallT< Dialer > > asyncCall(int aDebugSection, int aDebugLevel, const char *aName, const Dialer &aDialer)
Definition: AsyncCall.h:156
#define JobCallback(dbgSection, dbgLevel, Dialer, job, method)
Convenience macro to create a Dialer-based job callback.
Definition: AsyncJobCalls.h:69
void clientProcessRequestFinished(ConnStateData *conn, const HttpRequest::Pointer &request)
Definition: client_side.cc:1572
CBDATA_NAMESPACED_CLASS_INIT(Http1, Server)
void httpHdrMangleList(HttpHeader *l, HttpRequest *request, const AccessLogEntryPointer &al, req_or_rep_t req_or_rep)
Definition: HttpHeaderTools.cc:336
Definition: FilledChecklist.h:32
AccessLogEntry::Pointer al
info for the future access.log, and external ACL
Definition: FilledChecklist.h:101
void syncAle(HttpRequest *adaptedRequest, const char *logUri) const override
assigns uninitialized adapted_request and url ALE components
Definition: FilledChecklist.cc:121
Definition: AsyncJob.h:32
Definition: client_side_request.h:38
void initRequest(HttpRequest *)
Definition: client_side_request.cc:1609
void setLogUriToRawUri(const char *, const HttpRequestMethod &)
Definition: client_side_request.cc:1892
Definition: CommCalls.h:166
noteTakeServerConnectionControl() callback parameter
Definition: client_side.h:213
Definition: client_side.h:84
virtual int pipelinePrefetchMax() const
returning N allows a pipeline of 1+N requests (see pipeline_prefetch)
Definition: client_side.cc:1736
void requestTimeout(const CommTimeoutCbParams ¶ms)
Definition: client_side.cc:2098
void noteBodyConsumerAborted(BodyPipe::Pointer) override=0
Definition: client_side.cc:2087
bundles HTTP 1xx reply and the "successfully forwarded" callback
Definition: HttpControlMsg.h:47
void updateOrAddStr(Http::HdrType, const SBuf &)
Definition: HttpHeader.cc:1084
Definition: HttpReply.h:25
void removeIrrelevantContentLength()
Some response status codes prohibit sending Content-Length (RFC 7230 section 3.3.2).
Definition: HttpReply.cc:648
static HttpRequest * FromUrlXXX(const char *url, const MasterXaction::Pointer &, const HttpRequestMethod &method=Http::METHOD_GET)
Definition: HttpRequest.cc:528
bool forcedBodyContinuation
whether we have responded with HTTP 100 or FTP 150 already
Definition: HttpRequest.h:194
Definition: RequestParser.h:31
Manages a connection from an HTTP/1 or HTTP/0.9 client.
Definition: Http1Server.h:24
void handleReply(HttpReply *rep, StoreIOBuffer receivedData) override
Definition: Http1Server.cc:295
Server(const MasterXaction::Pointer &xact, const bool beHttpsServer)
Definition: Http1Server.cc:27
void proceedAfterBodyContinuation(Http::StreamPointer context)
Definition: Http1Server.cc:222
bool buildHttpRequest(Http::StreamPointer &context)
Definition: Http1Server.cc:94
void setReplyError(Http::StreamPointer &context, HttpRequest::Pointer &request, err_type requestError, Http::StatusCode errStatusCode, const char *requestErrorBytes)
Definition: Http1Server.cc:203
void noteTakeServerConnectionControl(ServerConnectionContext) override
Definition: Http1Server.cc:375
void processParsedRequest(Http::StreamPointer &context) override
start processing a freshly parsed request
Definition: Http1Server.cc:240
time_t idleTimeout() const override
timeout to use when waiting for the next request
Definition: Http1Server.cc:35
bool writeControlMsgAndCall(HttpReply *rep, AsyncCall::Pointer &call) override
handle a control message received by context from a peer and call back
Definition: Http1Server.cc:327
Http::Stream * parseOneRequest() override
Definition: Http1Server.cc:73
void noteBodyConsumerAborted(BodyPipe::Pointer) override
Definition: Http1Server.cc:288
void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override
Definition: Http1Server.cc:60
int pipelinePrefetchMax() const override
returning N allows a pipeline of 1+N requests (see pipeline_prefetch)
Definition: Http1Server.cc:229
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: Stream.h:73
static Pointer MakePortful(const AnyP::PortCfgPointer &aPort)
Definition: MasterXaction.h:54
Definition: MemBuf.h:24
void append(const NotePairs *src)
Append the entries of the src NotePairs list to our list.
Definition: Notes.cc:374
Definition: Server.h:32
struct SquidConfig::@107 accessList
struct SquidConfig::@93 Timeout
acl_access * forceRequestBodyContinuation
Definition: SquidConfig.h:404
Definition: StoreIOBuffer.h:16
Definition: SquidString.h:26
Definition: AsyncJobCalls.h:108
Definition: client_side_reply.h:23
void setReplyToError(err_type, Http::StatusCode, char const *, const ConnStateData *, HttpRequest *, const char *, Auth::UserRequest::Pointer)
builds error using clientBuildError() and calls setReplyToError() below
Definition: client_side_reply.cc:95
Definition: clientStream.h:76
void clientProcessRequest(ConnStateData *conn, const Http1::RequestParserPointer &hp, Http::Stream *context)
Definition: client_side.cc:1588
int commSetConnTimeout(const Comm::ConnectionPointer &conn, time_t timeout, AsyncCall::Pointer &callback)
Definition: comm.cc:595
void Write(const Comm::ConnectionPointer &conn, const char *buf, int size, AsyncCall::Pointer &callback, FREE *free_func)
Definition: Write.cc:33
Definition: forward.h:17
ConnStateData * NewServer(const MasterXactionPointer &xact)
create a new HTTP connection handler; never returns NULL
Definition: Http1Server.cc:391
AnyP::ProtocolVersion ProtocolVersion(unsigned int aMajor, unsigned int aMinor)
HTTP version label information.
Definition: ProtocolVersion.h:19
ConnStateData * NewServer(const MasterXactionPointer &xact)
create a new HTTPS connection handler; never returns NULL
Definition: Http1Server.cc:397
Definition: parse.c:104
void switchToTunnel(HttpRequest *request, const Comm::ConnectionPointer &clientConn, const Comm::ConnectionPointer &srvConn, const SBuf &preReadServerData)
Definition: tunnel.cc:1488