Kea 3.1.4
connection.cc
Go to the documentation of this file.
1// Copyright (C) 2017-2025 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#include <config.h>
8
10#include <dhcp/iface_mgr.h>
11#include <http/connection.h>
13#include <http/http_log.h>
14#include <http/http_messages.h>
15#include <boost/make_shared.hpp>
16#include <functional>
17
18using namespace isc::asiolink;
19using namespace isc::dhcp;
20using namespace isc::util;
21namespace ph = std::placeholders;
22
23namespace {
24
28constexpr size_t MAX_LOGGED_MESSAGE_SIZE = 1024;
29
30}
31
32namespace isc {
33namespace http {
34
36 const HttpRequestPtr& request)
37 : request_(request ? request : response_creator->createNewHttpRequest()),
38 parser_(new HttpRequestParser(*request_)),
39 input_buf_(),
40 output_buf_() {
41 parser_->initModel();
42}
43
46 return (boost::make_shared<Transaction>(response_creator));
47}
48
51 const TransactionPtr& transaction) {
52 if (transaction) {
53 return (boost::make_shared<Transaction>(response_creator,
54 transaction->getRequest()));
55 }
56 return (create(response_creator));
57}
58
59void
60HttpConnection::
61SocketCallback::operator()(boost::system::error_code ec, size_t length) {
62 if (ec.value() == boost::asio::error::operation_aborted) {
63 return;
64 }
65 callback_(ec, length);
66}
67
69 const HttpAcceptorPtr& acceptor,
70 const TlsContextPtr& tls_context,
71 HttpConnectionPoolPtr connection_pool,
72 const HttpResponseCreatorPtr& response_creator,
73 const HttpAcceptorCallback& callback,
74 const long request_timeout,
75 const long idle_timeout)
77 request_timeout_(request_timeout), tls_context_(tls_context),
78 idle_timeout_(idle_timeout), tcp_socket_(), tls_socket_(),
79 acceptor_(acceptor), connection_pool_(connection_pool),
80 response_creator_(response_creator), acceptor_callback_(callback),
82 if (!tls_context) {
84 } else {
86 tls_context));
87 }
88}
89
93
94void
96 use_external_ = use_external;
97}
98
99void
101 if (!request) {
102 // Should never happen.
103 return;
104 }
105
106 // Record the remote address.
107 request->setRemote(getRemoteEndpointAddressAsText());
108
109 // Record TLS parameters.
110 if (!tls_socket_) {
111 return;
112 }
113
114 // The connection uses HTTPS aka HTTP over TLS.
115 request->setTls(true);
116
117 // Record the first commonName of the subjectName of the client
118 // certificate when wanted.
120 request->setSubject(tls_socket_->getTlsStream().getSubject());
121 }
122
123 // Record the first commonName of the issuerName of the client
124 // certificate when wanted.
126 request->setIssuer(tls_socket_->getTlsStream().getIssuer());
127 }
128}
129
130void
131HttpConnection::shutdownCallback(const boost::system::error_code&) {
132 if (use_external_) {
135 }
136
137 tls_socket_->close();
138}
139
140void
142 request_timer_.cancel();
143 if (tcp_socket_) {
144 if (use_external_) {
147 }
148 tcp_socket_->close();
149 return;
150 }
151 if (tls_socket_) {
152 // Create instance of the callback to close the socket.
153 SocketCallback cb(std::bind(&HttpConnection::shutdownCallback,
154 shared_from_this(),
155 ph::_1)); // error_code
156 tls_socket_->shutdown(cb);
157 return;
158 }
159 // Not reachable?
160 isc_throw(Unexpected, "internal error: unable to shutdown the socket");
161}
162
163void
165 if (!watch_socket_) {
167 return;
168 }
169 try {
170 watch_socket_->markReady();
171 } catch (const std::exception& ex) {
173 .arg(ex.what());
174 }
175}
176
177void
179 if (!watch_socket_) {
181 return;
182 }
183 try {
184 watch_socket_->clearReady();
185 } catch (const std::exception& ex) {
187 .arg(ex.what());
188 }
189}
190
191void
193 if (!watch_socket_) {
195 return;
196 }
198 // Close watch socket and log errors if occur.
199 std::string watch_error;
200 if (!watch_socket_->closeSocket(watch_error)) {
202 .arg(watch_error);
203 }
204}
205
206void
208 if (defer_shutdown_) {
209 io_service_->post(std::bind([](HttpConnectionPtr c) { c->close(); }, shared_from_this()));
210 return;
211 }
212 request_timer_.cancel();
213 if (tcp_socket_) {
214 if (use_external_) {
217 }
218 tcp_socket_->close();
219 return;
220 }
221 if (tls_socket_) {
222 if (use_external_) {
225 }
226 tls_socket_->close();
227 return;
228 }
229 // Not reachable?
230 isc_throw(Unexpected, "internal error: unable to close the socket");
231}
232
233void
235 auto connection_pool = connection_pool_.lock();
236 try {
240 if (connection_pool) {
241 connection_pool->shutdown(shared_from_this());
242 } else {
243 shutdown();
244 }
245 } catch (...) {
247 }
248}
249
250void
252 auto connection_pool = connection_pool_.lock();
253 try {
257 if (connection_pool) {
258 connection_pool->stop(shared_from_this());
259 } else {
260 close();
261 }
262 } catch (...) {
264 }
265}
266
267void
269 // Create instance of the callback. It is safe to pass the local instance
270 // of the callback, because the underlying boost functions make copies
271 // as needed.
273 shared_from_this(),
274 ph::_1); // error
275 try {
276 HttpsAcceptorPtr tls_acceptor =
277 boost::dynamic_pointer_cast<HttpsAcceptor>(acceptor_);
278 if (!tls_acceptor) {
279 if (!tcp_socket_) {
280 isc_throw(Unexpected, "internal error: TCP socket is null");
281 }
282 acceptor_->asyncAccept(*tcp_socket_, cb);
283 } else {
284 if (!tls_socket_) {
285 isc_throw(Unexpected, "internal error: TLS socket is null");
286 }
287 tls_acceptor->asyncAccept(*tls_socket_, cb);
288 }
289 } catch (const std::exception& ex) {
290 isc_throw(HttpConnectionError, "unable to start accepting TCP "
291 "connections: " << ex.what());
292 }
293}
294
295void
297 // Skip the handshake if the socket is not a TLS one.
298 if (!tls_socket_) {
299 doRead();
300 return;
301 }
302
303 // Create instance of the callback. It is safe to pass the local instance
304 // of the callback, because the underlying boost functions make copies
305 // as needed.
306 SocketCallback cb(std::bind(&HttpConnection::handshakeCallback,
307 shared_from_this(),
308 ph::_1)); // error
309 try {
310 tls_socket_->handshake(cb);
311 if (use_external_) {
313 }
314 } catch (const std::exception& ex) {
315 isc_throw(HttpConnectionError, "unable to perform TLS handshake: "
316 << ex.what());
317 }
318}
319
320void
322 try {
323 TCPEndpoint endpoint;
324
325 // Transaction hasn't been created if we are starting to read the
326 // new request.
327 if (!transaction) {
329 recordParameters(transaction->getRequest());
330 }
331
332 // Create instance of the callback. It is safe to pass the local instance
333 // of the callback, because the underlying std functions make copies
334 // as needed.
335 SocketCallback cb(std::bind(&HttpConnection::socketReadCallback,
336 shared_from_this(),
337 transaction,
338 ph::_1, // error
339 ph::_2)); //bytes_transferred
340 if (tcp_socket_) {
341 tcp_socket_->asyncReceive(static_cast<void*>(transaction->getInputBufData()),
342 transaction->getInputBufSize(),
343 0, &endpoint, cb);
344 return;
345 }
346 if (tls_socket_) {
347 tls_socket_->asyncReceive(static_cast<void*>(transaction->getInputBufData()),
348 transaction->getInputBufSize(),
349 0, &endpoint, cb);
350 return;
351 }
352 } catch (...) {
354 }
355}
356
357void
359 try {
360 if (transaction->outputDataAvail()) {
361 // Create instance of the callback. It is safe to pass the local instance
362 // of the callback, because the underlying std functions make copies
363 // as needed.
364 SocketCallback cb(std::bind(&HttpConnection::socketWriteCallback,
365 shared_from_this(),
366 transaction,
367 ph::_1, // error
368 ph::_2)); // bytes_transferred
369 if (tcp_socket_) {
370 tcp_socket_->asyncSend(transaction->getOutputBufData(),
371 transaction->getOutputBufSize(),
372 cb);
373 if (use_external_) {
375 }
376 return;
377 }
378 if (tls_socket_) {
379 tls_socket_->asyncSend(transaction->getOutputBufData(),
380 transaction->getOutputBufSize(),
381 cb);
382 if (use_external_) {
384 }
385 return;
386 }
387 } else {
388 // The isPersistent() function may throw if the request hasn't
389 // been created, i.e. the HTTP headers weren't parsed. We catch
390 // this exception below and close the connection since we're
391 // unable to tell if the connection should remain persistent
392 // or not. The default is to close it.
393 if (!transaction->getRequest()->isPersistent()) {
395
396 } else {
397 // The connection is persistent and we are done sending
398 // the previous response. Start listening for the next
399 // requests.
401 doRead();
402 }
403 }
404 } catch (...) {
406 }
407}
408
409void
411 TransactionPtr transaction) {
412 transaction->setOutputBuf(response->toString());
413 doWrite(transaction);
414}
415
416void
417HttpConnection::acceptorCallback(const boost::system::error_code& ec) {
418 if (!acceptor_->isOpen()) {
419 return;
420 }
421
422 if (ec) {
424 }
425
427
428 if (!ec) {
429 if (!tls_context_) {
433 .arg(static_cast<unsigned>(request_timeout_/1000));
434 } else {
438 .arg(static_cast<unsigned>(request_timeout_/1000));
439 }
440
441 if (use_external_) {
442 auto& iface_mgr = IfaceMgr::instance();
443 if (tcp_socket_) {
444 iface_mgr.addExternalSocket(tcp_socket_->getNative(), 0);
445 }
446 if (tls_socket_) {
447 iface_mgr.addExternalSocket(tls_socket_->getNative(), 0);
448 }
449 watch_socket_.reset(new WatchSocket());
450 iface_mgr.addExternalSocket(watch_socket_->getSelectFd(), 0);
451 }
452
454 doHandshake();
455 }
456}
457
458void
459HttpConnection::handshakeCallback(const boost::system::error_code& ec) {
460 if (use_external_) {
462 }
463 if (ec) {
466 .arg(ec.message());
468 } else {
472
473 doRead();
474 }
475}
476
477void
479 boost::system::error_code ec, size_t length) {
480 if (ec) {
481 // IO service has been stopped and the connection is probably
482 // going to be shutting down.
483 if (ec.value() == boost::asio::error::operation_aborted) {
484 return;
485
486 // EWOULDBLOCK and EAGAIN are special cases. Everything else is
487 // treated as fatal error.
488 } else if ((ec.value() != boost::asio::error::try_again) &&
489 (ec.value() != boost::asio::error::would_block)) {
491
492 // We got EWOULDBLOCK or EAGAIN which indicate that we may be able to
493 // read something from the socket on the next attempt. Just make sure
494 // we don't try to read anything now in case there is any garbage
495 // passed in length.
496 } else {
497 length = 0;
498 }
499 }
500
501 // Receiving is in progress, so push back the timeout.
502 setupRequestTimer(transaction);
503
504 if (length != 0) {
507 .arg(length)
509
510 transaction->getParser()->postBuffer(static_cast<void*>(transaction->getInputBufData()),
511 length);
512 transaction->getParser()->poll();
513 }
514
515 if (transaction->getParser()->needData()) {
516 // The parser indicates that the some part of the message being
517 // received is still missing, so continue to read.
518 doRead(transaction);
519
520 } else {
521 try {
522 // The whole message has been received, so let's finalize it.
523 transaction->getRequest()->finalize();
524
528
532 .arg(transaction->getParser()->getBufferAsString(MAX_LOGGED_MESSAGE_SIZE));
533
534 } catch (const std::exception& ex) {
538 .arg(ex.what());
539
543 .arg(transaction->getParser()->getBufferAsString(MAX_LOGGED_MESSAGE_SIZE));
544 }
545
546 // Don't want to timeout if creation of the response takes long.
547 request_timer_.cancel();
548
549 defer_shutdown_ = true;
550
551 std::unique_ptr<HttpConnection, void (*)(HttpConnection*)> p(this, [](HttpConnection* c) {
552 c->defer_shutdown_ = false;
553 });
554
555 // Create the response from the received request using the custom
556 // response creator.
557 HttpResponsePtr response = response_creator_->createHttpResponse(transaction->getRequest());
560 .arg(response->toBriefString())
562
566 .arg(HttpMessageParserBase::logFormatHttpMessage(response->toString(),
567 MAX_LOGGED_MESSAGE_SIZE));
568
569 // Response created. Activate the timer again.
570 setupRequestTimer(transaction);
571
572 // Start sending the response.
573 asyncSendResponse(response, transaction);
574 }
575}
576
577void
579 boost::system::error_code ec, size_t length) {
580 if (use_external_) {
582 }
583 if (ec) {
584 // IO service has been stopped and the connection is probably
585 // going to be shutting down.
586 if (ec.value() == boost::asio::error::operation_aborted) {
587 return;
588
589 // EWOULDBLOCK and EAGAIN are special cases. Everything else is
590 // treated as fatal error.
591 } else if ((ec.value() != boost::asio::error::try_again) &&
592 (ec.value() != boost::asio::error::would_block)) {
594
595 // We got EWOULDBLOCK or EAGAIN which indicate that we may be able to
596 // read something from the socket on the next attempt.
597 } else {
598 // Sending is in progress, so push back the timeout.
599 setupRequestTimer(transaction);
600
601 doWrite(transaction);
602 }
603 }
604
605 // Since each transaction has its own output buffer, it is not really
606 // possible that the number of bytes written is larger than the size
607 // of the buffer. But, let's be safe and set the length to the size
608 // of the buffer if that unexpected condition occurs.
609 if (length > transaction->getOutputBufSize()) {
610 length = transaction->getOutputBufSize();
611 }
612
613 if (length <= transaction->getOutputBufSize()) {
614 // Sending is in progress, so push back the timeout.
615 setupRequestTimer(transaction);
616 }
617
618 // Eat the 'length' number of bytes from the output buffer and only
619 // leave the part of the response that hasn't been sent.
620 transaction->consumeOutputBuf(length);
621
622 // Schedule the write of the unsent data.
623 doWrite(transaction);
624}
625
626void
628 // Pass raw pointer rather than shared_ptr to this object,
629 // because IntervalTimer already passes shared pointer to the
630 // IntervalTimerImpl to make sure that the callback remains
631 // valid.
633 this, transaction),
635}
636
637void
643
644void
649
650 // We need to differentiate the transactions between a normal response and the
651 // timeout. We create new transaction from the current transaction. It is
652 // to preserve the request we're responding to.
653 auto spawned_transaction = Transaction::spawn(response_creator_, transaction);
654
655 // The new transaction inherits the request from the original transaction
656 // if such transaction exists.
657 auto request = spawned_transaction->getRequest();
658
659 // Depending on when the timeout occurred, the HTTP version of the request
660 // may or may not be available. Therefore we check if the HTTP version is
661 // set in the request. If it is not available, we need to create a dummy
662 // request with the default HTTP/1.0 version. This version will be used
663 // in the response.
664 if (request->context()->http_version_major_ == 0) {
665 request.reset(new HttpRequest(HttpRequest::Method::HTTP_POST, "/",
667 HostHttpHeader("dummy")));
668 request->finalize();
669 }
670
671 // Create the timeout response.
672 HttpResponsePtr response =
673 response_creator_->createStockHttpResponse(request,
675
676 // Send the HTTP 408 status.
677 asyncSendResponse(response, spawned_transaction);
678}
679
680void
685 // In theory we should shutdown first and stop/close after but
686 // it is better to put the connection management responsibility
687 // on the client... so simply drop idle connections.
689}
690
691std::string
693 try {
694 if (tcp_socket_) {
695 if (tcp_socket_->getASIOSocket().is_open()) {
696 return (tcp_socket_->getASIOSocket().remote_endpoint().address().to_string());
697 }
698 } else if (tls_socket_) {
699 if (tls_socket_->getASIOSocket().is_open()) {
700 return (tls_socket_->getASIOSocket().remote_endpoint().address().to_string());
701 }
702 }
703 } catch (...) {
704 }
705 return ("(unknown address)");
706}
707
708} // end of namespace isc::http
709} // end of namespace isc
A generic exception that is thrown when an unexpected error condition occurs.
void deleteExternalSocket(int socketfd)
Deletes external socket.
Definition iface_mgr.cc:352
static IfaceMgr & instance()
IfaceMgr is a singleton class.
Definition iface_mgr.cc:47
Represents HTTP Host header.
Definition http_header.h:68
Generic error reported within HttpConnection class.
Definition connection.h:27
static TransactionPtr create(const HttpResponseCreatorPtr &response_creator)
Creates new transaction instance.
Definition connection.cc:45
Transaction(const HttpResponseCreatorPtr &response_creator, const HttpRequestPtr &request=HttpRequestPtr())
Constructor.
Definition connection.cc:35
static TransactionPtr spawn(const HttpResponseCreatorPtr &response_creator, const TransactionPtr &transaction)
Creates new transaction from the current transaction.
Definition connection.cc:50
void closeWatchSocket()
Close the watch socket.
void socketReadCallback(TransactionPtr transaction, boost::system::error_code ec, size_t length)
Callback invoked when new data is received over the socket.
std::weak_ptr< HttpConnectionPool > connection_pool_
Connection pool holding this connection.
Definition connection.h:447
asiolink::TlsContextPtr tls_context_
TLS context.
Definition connection.h:431
asiolink::IOServicePtr io_service_
The IO service used to handle events.
Definition connection.h:422
void markWatchSocketReady()
Mark the watch socket as ready.
void recordParameters(const HttpRequestPtr &request) const
Records connection parameters into the HTTP request.
void acceptorCallback(const boost::system::error_code &ec)
Local callback invoked when new connection is accepted.
boost::shared_ptr< Transaction > TransactionPtr
Shared pointer to the Transaction.
Definition connection.h:87
void setupIdleTimer()
Reset timer for detecting idle timeout in persistent connections.
void clearWatchSocket()
Clear the watch socket's ready marker.
virtual void socketWriteCallback(TransactionPtr transaction, boost::system::error_code ec, size_t length)
Callback invoked when data is sent over the socket.
void doHandshake()
Asynchronously performs TLS handshake.
void asyncSendResponse(const ConstHttpResponsePtr &response, TransactionPtr transaction)
Sends HTTP response asynchronously.
void doRead(TransactionPtr transaction=TransactionPtr())
Starts asynchronous read from the socket.
HttpAcceptorPtr acceptor_
Pointer to the TCP acceptor used to accept new connections.
Definition connection.h:444
std::unique_ptr< asiolink::TLSSocket< SocketCallback > > tls_socket_
TLS socket used by this connection.
Definition connection.h:441
void doWrite(TransactionPtr transaction)
Starts asynchronous write to the socket.
bool defer_shutdown_
Flag which indicates if the connection shutdown should be deferred until the connection is no longer ...
Definition connection.h:465
void setupRequestTimer(TransactionPtr transaction=TransactionPtr())
Reset timer for detecting request timeouts.
void shutdown()
Shutdown the socket.
void shutdownCallback(const boost::system::error_code &ec)
Callback invoked when TLS shutdown is performed.
void close()
Closes the socket.
void stopThisConnection()
Stops current connection.
HttpConnection(const asiolink::IOServicePtr &io_service, const HttpAcceptorPtr &acceptor, const asiolink::TlsContextPtr &tls_context, std::shared_ptr< HttpConnectionPool > connection_pool, const HttpResponseCreatorPtr &response_creator, const HttpAcceptorCallback &callback, const long request_timeout, const long idle_timeout)
Constructor.
Definition connection.cc:68
std::string getRemoteEndpointAddressAsText() const
Returns remote address in textual form.
bool use_external_
Use external sockets flag.
Definition connection.h:457
void handshakeCallback(const boost::system::error_code &ec)
Local callback invoked when TLS handshake is performed.
HttpResponseCreatorPtr response_creator_
Pointer to the HttpResponseCreator object used to create HTTP responses.
Definition connection.h:451
long idle_timeout_
Timeout after which the persistent HTTP connection is shut down by the server.
Definition connection.h:435
void asyncAccept()
Asynchronously accepts new connection.
std::unique_ptr< asiolink::TCPSocket< SocketCallback > > tcp_socket_
TCP socket used by this connection.
Definition connection.h:438
void requestTimeoutCallback(TransactionPtr transaction)
Callback invoked when the HTTP Request Timeout occurs.
void addExternalSockets(bool use_external=false)
Use external sockets flag.
Definition connection.cc:95
asiolink::IntervalTimer request_timer_
Timer used to detect Request Timeout.
Definition connection.h:425
HttpAcceptorCallback acceptor_callback_
External TCP acceptor callback.
Definition connection.h:454
util::WatchSocketPtr watch_socket_
Pointer to watch socket instance used to signal that the socket is ready for read or write when use e...
Definition connection.h:461
long request_timeout_
Configured Request Timeout in milliseconds.
Definition connection.h:428
void shutdownConnection()
Shuts down current connection.
virtual ~HttpConnection()
Destructor.
Definition connection.cc:90
static std::string logFormatHttpMessage(const std::string &message, const size_t limit=0)
Formats provided HTTP message for logging.
A generic parser for HTTP requests.
Represents HTTP request message.
Definition request.h:57
static bool recordIssuer_
Record issuer name.
Definition request.h:255
static bool recordSubject_
Access control parameters: Flags which indicate what information to record.
Definition request.h:252
Provides an IO "ready" semaphore for use with select() or poll() WatchSocket exposes a single open fi...
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
#define LOG_ERROR(LOGGER, MESSAGE)
Macro to conveniently test error output and log it.
Definition macros.h:32
#define LOG_INFO(LOGGER, MESSAGE)
Macro to conveniently test info output and log it.
Definition macros.h:20
#define LOG_DEBUG(LOGGER, LEVEL, MESSAGE)
Macro to conveniently test debug output and log it.
Definition macros.h:14
const isc::log::MessageID HTTP_CONNECTION_SHUTDOWN
const isc::log::MessageID HTTP_CONNECTION_WATCH_SOCKET_CLOSE_ERROR
const isc::log::MessageID HTTP_CONNECTION_HANDSHAKE_START
const isc::log::MessageID HTTP_CONNECTION_SHUTDOWN_FAILED
boost::shared_ptr< const HttpResponse > ConstHttpResponsePtr
Pointer to the const HttpResponse object.
Definition response.h:84
const isc::log::MessageID HTTP_IDLE_CONNECTION_TIMEOUT_OCCURRED
const isc::log::MessageID HTTP_DATA_RECEIVED
const isc::log::MessageID HTTP_BAD_CLIENT_REQUEST_RECEIVED_DETAILS
const isc::log::MessageID HTTP_SERVER_RESPONSE_SEND_DETAILS
const isc::log::MessageID HTTP_CONNECTION_STOP_FAILED
isc::log::Logger http_logger("http")
Defines the logger used within libkea-http library.
Definition http_log.h:18
const isc::log::MessageID HTTP_CLIENT_REQUEST_RECEIVED
const isc::log::MessageID HTTP_CLIENT_REQUEST_TIMEOUT_OCCURRED
const isc::log::MessageID HTTPS_REQUEST_RECEIVE_START
const isc::log::MessageID HTTP_CONNECTION_STOP
std::shared_ptr< HttpConnectionPool > HttpConnectionPoolPtr
Pointer to the HttpConnectionPool.
const isc::log::MessageID HTTP_CONNECTION_HANDSHAKE_FAILED
boost::shared_ptr< HttpResponseCreator > HttpResponseCreatorPtr
Pointer to the HttpResponseCreator object.
boost::shared_ptr< HttpResponse > HttpResponsePtr
Pointer to the HttpResponse object.
Definition response.h:81
const isc::log::MessageID HTTP_REQUEST_RECEIVE_START
const isc::log::MessageID HTTP_CLIENT_REQUEST_RECEIVED_DETAILS
const isc::log::MessageID HTTP_CONNECTION_WATCH_SOCKET_CLEAR_ERROR
std::function< void(const boost::system::error_code &)> HttpAcceptorCallback
Type of the callback for the TCP acceptor used in this library.
boost::shared_ptr< HttpConnection > HttpConnectionPtr
Pointer to the HttpConnection.
Definition connection.h:41
boost::shared_ptr< HttpRequest > HttpRequestPtr
Pointer to the HttpRequest object.
Definition request.h:30
boost::shared_ptr< HttpAcceptor > HttpAcceptorPtr
Type of shared pointer to TCP acceptors.
boost::shared_ptr< HttpsAcceptor > HttpsAcceptorPtr
Type of shared pointer to TLS acceptors.
const isc::log::MessageID HTTP_CONNECTION_WATCH_SOCKET_MARK_READY_ERROR
const isc::log::MessageID HTTP_BAD_CLIENT_REQUEST_RECEIVED
const isc::log::MessageID HTTP_SERVER_RESPONSE_SEND
const int DBGLVL_TRACE_BASIC
Trace basic operations.
const int DBGLVL_TRACE_DETAIL_DATA
Trace data associated with detailed operations.
const int DBGLVL_TRACE_BASIC_DATA
Trace data associated with the basic operations.
const int DBGLVL_TRACE_DETAIL
Trace detailed operations.
Defines the logger used by the top-level component of kea-lfc.
static const HttpVersion & HTTP_10()
HTTP version 1.0.
Definition http_types.h:53