Http1Server.h
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#ifndef SQUID_SRC_SERVERS_HTTP1SERVER_H
10#define SQUID_SRC_SERVERS_HTTP1SERVER_H
11
12#include "servers/forward.h"
13
14namespace Http
15{
16namespace One
17{
18
20class Server: public ConnStateData
21{
23
24public:
25 Server(const MasterXaction::Pointer &xact, const bool beHttpsServer);
26 ~Server() override {}
27
29
30protected:
31 /* ConnStateData API */
32 Http::Stream *parseOneRequest() override;
33 void processParsedRequest(Http::StreamPointer &context) override;
34 void handleReply(HttpReply *rep, StoreIOBuffer receivedData) override;
35 bool writeControlMsgAndCall(HttpReply *rep, AsyncCall::Pointer &call) override;
36 int pipelinePrefetchMax() const override;
37 time_t idleTimeout() const override;
39
40 /* BodyPipe API */
43
44 /* AsyncJob API */
45 void start() override;
46
48
49private:
50 void processHttpRequest(Http::Stream *const context);
52
58
59 void setReplyError(Http::StreamPointer &context, HttpRequest::Pointer &request, err_type requestError, Http::StatusCode errStatusCode, const char *requestErrorBytes);
60
63
65 const bool isHttpsServer;
66};
67
68} // namespace One
69} // namespace Http
70
71#endif /* SQUID_SRC_SERVERS_HTTP1SERVER_H */
72
noteTakeServerConnectionControl() callback parameter
Definition: client_side.h:214
Manages a connection from an HTTP/1 or HTTP/0.9 client.
Definition: Http1Server.h:21
~Server() override
Definition: Http1Server.h:26
const bool isHttpsServer
temporary hack to avoid creating a true HttpsServer class
Definition: Http1Server.h:65
void handleReply(HttpReply *rep, StoreIOBuffer receivedData) override
Definition: Http1Server.cc:295
Server(const MasterXaction::Pointer &xact, const bool beHttpsServer)
Definition: Http1Server.cc:27
HttpRequestMethod method_
parsed HTTP method
Definition: Http1Server.h:62
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
void handleHttpRequestData()
void processHttpRequest(Http::Stream *const context)
void start() override
called by AsyncStart; do not call directly
Definition: Http1Server.cc:41
Http::Stream * parseOneRequest() override
Definition: Http1Server.cc:73
void noteBodyConsumerAborted(BodyPipe::Pointer) override
Definition: Http1Server.cc:288
Http1::RequestParserPointer parser_
Definition: Http1Server.h:61
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
err_type
Definition: forward.h:14
Definition: forward.h:18
StatusCode
Definition: StatusCode.h:20

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors