Kea 2.7.8
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
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 }
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.
548
549 defer_shutdown_ = true;
550
551 std::unique_ptr<HttpConnection, void(*)(HttpConnection*)> p(this, [](HttpConnection* p) { p->defer_shutdown_ = false; });
552
553 // Create the response from the received request using the custom
554 // response creator.
555 HttpResponsePtr response = response_creator_->createHttpResponse(transaction->getRequest());
558 .arg(response->toBriefString())
560
564 .arg(HttpMessageParserBase::logFormatHttpMessage(response->toString(),
565 MAX_LOGGED_MESSAGE_SIZE));
566
567 // Response created. Activate the timer again.
568 setupRequestTimer(transaction);
569
570 // Start sending the response.
571 asyncSendResponse(response, transaction);
572 }
573}
574
575void
577 boost::system::error_code ec, size_t length) {
578 if (use_external_) {
580 }
581 if (ec) {
582 // IO service has been stopped and the connection is probably
583 // going to be shutting down.
584 if (ec.value() == boost::asio::error::operation_aborted) {
585 return;
586
587 // EWOULDBLOCK and EAGAIN are special cases. Everything else is
588 // treated as fatal error.
589 } else if ((ec.value() != boost::asio::error::try_again) &&
590 (ec.value() != boost::asio::error::would_block)) {
592
593 // We got EWOULDBLOCK or EAGAIN which indicate that we may be able to
594 // read something from the socket on the next attempt.
595 } else {
596 // Sending is in progress, so push back the timeout.
597 setupRequestTimer(transaction);
598
599 doWrite(transaction);
600 }
601 }
602
603 // Since each transaction has its own output buffer, it is not really
604 // possible that the number of bytes written is larger than the size
605 // of the buffer. But, let's be safe and set the length to the size
606 // of the buffer if that unexpected condition occurs.
607 if (length > transaction->getOutputBufSize()) {
608 length = transaction->getOutputBufSize();
609 }
610
611 if (length <= transaction->getOutputBufSize()) {
612 // Sending is in progress, so push back the timeout.
613 setupRequestTimer(transaction);
614 }
615
616 // Eat the 'length' number of bytes from the output buffer and only
617 // leave the part of the response that hasn't been sent.
618 transaction->consumeOutputBuf(length);
619
620 // Schedule the write of the unsent data.
621 doWrite(transaction);
622}
623
624void
626 // Pass raw pointer rather than shared_ptr to this object,
627 // because IntervalTimer already passes shared pointer to the
628 // IntervalTimerImpl to make sure that the callback remains
629 // valid.
631 this, transaction),
633}
634
635void
641
642void
647
648 // We need to differentiate the transactions between a normal response and the
649 // timeout. We create new transaction from the current transaction. It is
650 // to preserve the request we're responding to.
651 auto spawned_transaction = Transaction::spawn(response_creator_, transaction);
652
653 // The new transaction inherits the request from the original transaction
654 // if such transaction exists.
655 auto request = spawned_transaction->getRequest();
656
657 // Depending on when the timeout occurred, the HTTP version of the request
658 // may or may not be available. Therefore we check if the HTTP version is
659 // set in the request. If it is not available, we need to create a dummy
660 // request with the default HTTP/1.0 version. This version will be used
661 // in the response.
662 if (request->context()->http_version_major_ == 0) {
663 request.reset(new HttpRequest(HttpRequest::Method::HTTP_POST, "/",
665 HostHttpHeader("dummy")));
666 request->finalize();
667 }
668
669 // Create the timeout response.
670 HttpResponsePtr response =
671 response_creator_->createStockHttpResponse(request,
673
674 // Send the HTTP 408 status.
675 asyncSendResponse(response, spawned_transaction);
676}
677
678void
683 // In theory we should shutdown first and stop/close after but
684 // it is better to put the connection management responsibility
685 // on the client... so simply drop idle connections.
687}
688
689std::string
691 try {
692 if (tcp_socket_) {
693 if (tcp_socket_->getASIOSocket().is_open()) {
694 return (tcp_socket_->getASIOSocket().remote_endpoint().address().to_string());
695 }
696 } else if (tls_socket_) {
697 if (tls_socket_->getASIOSocket().is_open()) {
698 return (tls_socket_->getASIOSocket().remote_endpoint().address().to_string());
699 }
700 }
701 } catch (...) {
702 }
703 return ("(unknown address)");
704}
705
706} // end of namespace isc::http
707} // 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:54
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
Accepts and handles a single HTTP connection.
Definition connection.h:44
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.
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
boost::shared_ptr< Transaction > TransactionPtr
Shared pointer to the Transaction.
Definition connection.h:87
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