MySQL 8.0.43
Source Code Documentation
http_request.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2021, 2025, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24*/
25
26#ifndef MYSQLROUTER_HTTP_REQUEST_INCLUDED
27#define MYSQLROUTER_HTTP_REQUEST_INCLUDED
28
30
31#include <bitset>
32#include <cstdint>
33#include <ctime>
34#include <functional> // std::function
35#include <memory>
36#include <stdexcept>
37#include <string>
38#include <system_error>
39#include <vector>
40
42
43// http_common.cc
44
45class EventBase;
46class EventBuffer;
47
48// https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
49namespace HttpStatusCode {
50using name_type = const char *;
51using key_type = int;
52
53constexpr key_type Continue = 100; // RFC 7231
54constexpr key_type SwitchingProtocols = 101; // RFC 7231
55constexpr key_type Processing = 102; // RFC 2518
56constexpr key_type EarlyHints = 103; // RFC 8297
57
58constexpr key_type Ok = 200; // RFC 7231
59constexpr key_type Created = 201; // RFC 7231
60constexpr key_type Accepted = 202; // RFC 7231
61constexpr key_type NonAuthoritiveInformation = 203; // RFC 7231
62constexpr key_type NoContent = 204; // RFC 7231
63constexpr key_type ResetContent = 205; // RFC 7231
64constexpr key_type PartialContent = 206; // RFC 7233
65constexpr key_type MultiStatus = 207; // RFC 4918
66constexpr key_type AlreadyReported = 208; // RFC 5842
67constexpr key_type InstanceManipulationUsed = 226; // RFC 3229
68
69constexpr key_type MultipleChoices = 300; // RFC 7231
70constexpr key_type MovedPermanently = 301; // RFC 7231
71constexpr key_type Found = 302; // RFC 7231
72constexpr key_type SeeOther = 303; // RFC 7231
73constexpr key_type NotModified = 304; // RFC 7232
74constexpr key_type UseProxy = 305; // RFC 7231
75constexpr key_type TemporaryRedirect = 307; // RFC 7231
76constexpr key_type PermanentRedirect = 308; // RFC 7538
77
78constexpr key_type BadRequest = 400; // RFC 7231
79constexpr key_type Unauthorized = 401; // RFC 7235
80constexpr key_type PaymentRequired = 402; // RFC 7231
81constexpr key_type Forbidden = 403; // RFC 7231
82constexpr key_type NotFound = 404; // RFC 7231
83constexpr key_type MethodNotAllowed = 405; // RFC 7231
84constexpr key_type NotAcceptable = 406; // RFC 7231
85constexpr key_type ProxyAuthenticationRequired = 407; // RFC 7235
86constexpr key_type RequestTimeout = 408; // RFC 7231
87constexpr key_type Conflicts = 409; // RFC 7231
88constexpr key_type Gone = 410; // RFC 7231
89constexpr key_type LengthRequired = 411; // RFC 7231
90constexpr key_type PreconditionFailed = 412; // RFC 7232
91constexpr key_type PayloadTooLarge = 413; // RFC 7231
92constexpr key_type URITooLarge = 414; // RFC 7231
93constexpr key_type UnsupportedMediaType = 415; // RFC 7231
94constexpr key_type RangeNotSatisfiable = 416; // RFC 7233
95constexpr key_type ExpectationFailed = 417; // RFC 7231
96constexpr key_type IamaTeapot = 418; // RFC 7168
97constexpr key_type MisdirectedRequest = 421; // RFC 7540
98constexpr key_type UnprocessableEntity = 422; // RFC 4918
99constexpr key_type Locked = 423; // RFC 4918
100constexpr key_type FailedDependency = 424; // RFC 4918
101constexpr key_type UpgradeRequired = 426; // RFC 7231
102constexpr key_type PreconditionRequired = 428; // RFC 6585
103constexpr key_type TooManyRequests = 429; // RFC 6585
104constexpr key_type RequestHeaderFieldsTooLarge = 431; // RFC 6585
105constexpr key_type UnavailableForLegalReasons = 451; // RFC 7725
106
107constexpr key_type InternalError = 500; // RFC 7231
108constexpr key_type NotImplemented = 501; // RFC 7231
109constexpr key_type BadGateway = 502; // RFC 7231
110constexpr key_type ServiceUnavailable = 503; // RFC 7231
111constexpr key_type GatewayTimeout = 504; // RFC 7231
112constexpr key_type HTTPVersionNotSupported = 505; // RFC 7231
113constexpr key_type VariantAlsoNegotiates = 506; // RFC 2295
114constexpr key_type InsufficientStorage = 507; // RFC 4918
115constexpr key_type LoopDetected = 508; // RFC 5842
116constexpr key_type NotExtended = 510; // RFC 2774
117constexpr key_type NetworkAuthorizationRequired = 511; // RFC 6585
118
120 switch (key) {
121 case Continue:
122 return "Continue";
124 return "Switching Protocols";
125 case Processing:
126 return "Processing";
127 case EarlyHints:
128 return "Early Hints";
129
130 case Ok:
131 return "Ok";
132 case Created:
133 return "Created";
134 case Accepted:
135 return "Accepted";
137 return "Non Authoritive Information";
138 case NoContent:
139 return "No Content";
140 case ResetContent:
141 return "Reset Content";
142 case PartialContent:
143 return "Partial Content";
144 case MultiStatus:
145 return "Multi Status";
146 case AlreadyReported:
147 return "Already Reported";
149 return "IMUsed";
150
151 case MultipleChoices:
152 return "Multiple Choices";
153 case MovedPermanently:
154 return "Moved Permanently";
155 case Found:
156 return "Found";
157 case SeeOther:
158 return "See Other";
159 case NotModified:
160 return "Not Modified";
161 case UseProxy:
162 return "Use Proxy";
164 return "Temporary Redirect";
166 return "Permanent Redirect";
167
168 case BadRequest:
169 return "Bad Request";
170 case Unauthorized:
171 return "Unauthorized";
172 case PaymentRequired:
173 return "Payment Required";
174 case Forbidden:
175 return "Forbidden";
176 case NotFound:
177 return "Not Found";
178 case MethodNotAllowed:
179 return "Method Not Allowed";
180 case NotAcceptable:
181 return "Not NotAcceptable";
183 return "Proxy Authentication Required";
184 case RequestTimeout:
185 return "Request Timeout";
186 case Conflicts:
187 return "Conflicts";
188 case Gone:
189 return "Gone";
190 case LengthRequired:
191 return "Length Required";
193 return "Precondition Failed";
194 case PayloadTooLarge:
195 return "Payload Too Large";
196 case URITooLarge:
197 return "URITooLarge";
199 return "Unsupported MediaType";
201 return "Range Not Satisfiable";
203 return "Expectation Failed";
204 case IamaTeapot:
205 return "I am a Teapot";
207 return "Misdirected Request";
209 return "Unprocessable Entity";
210 case Locked:
211 return "Locked";
212 case FailedDependency:
213 return "Failed Dependency";
214 case UpgradeRequired:
215 return "Upgrade Required";
217 return "Precondition Required";
218 case TooManyRequests:
219 return "Too Many Requests";
221 return "Request Header Fields Too Large";
223 return "Unavailable For Legal Reasons";
224
225 case InternalError:
226 return "Internal Error";
227 case NotImplemented:
228 return "Not Implemented";
229 case BadGateway:
230 return "Bad Gateway";
232 return "Service Unavailable";
233 case GatewayTimeout:
234 return "Gateway Timeout";
236 return "HTTP Version Not Supported";
238 return "Variant Also Negotiates";
240 return "Insufficient Storage";
241 case LoopDetected:
242 return "Loop Detected";
243 case NotExtended:
244 return "Not Extended";
246 return "Network Authorization Required";
247 default:
248 throw std::logic_error("no text for HTTP Status " + std::to_string(key));
249 }
250}
251} // namespace HttpStatusCode
252
253namespace HttpMethod {
254using type = int;
255using pos_type = unsigned;
256namespace Pos {
257constexpr pos_type Get = 0;
258constexpr pos_type Post = 1;
259constexpr pos_type Head = 2;
260constexpr pos_type Put = 3;
261constexpr pos_type Delete = 4;
262constexpr pos_type Options = 5;
263constexpr pos_type Trace = 6;
264constexpr pos_type Connect = 7;
265constexpr pos_type Patch = 8;
266
267constexpr pos_type _LAST = Patch;
268} // namespace Pos
269using Bitset = std::bitset<Pos::_LAST + 1>;
270
271constexpr type Get{1 << Pos::Get};
272constexpr type Post{1 << Pos::Post};
273constexpr type Head{1 << Pos::Head};
274constexpr type Put{1 << Pos::Put};
275constexpr type Delete{1 << Pos::Delete};
276constexpr type Options{1 << Pos::Options};
277constexpr type Trace{1 << Pos::Trace};
278constexpr type Connect{1 << Pos::Connect};
279constexpr type Patch{1 << Pos::Patch};
280} // namespace HttpMethod
281
282/**
283 * Http bound socket
284 *
285 * Wrapper for `evhttp_bound_socket` structure from `libevent`.
286 */
288 public:
289 using BoundHandle = void *;
291
292 bool is_valid() const { return handle_ != nullptr; }
293
294 private:
296};
297
298/**
299 * headers of a HTTP response/request.
300 */
302 public:
304 public:
305 using IteratorHandle = void *;
306 Iterator(IteratorHandle node) : node_{node} {}
307
308 std::pair<std::string, std::string> operator*();
310 bool operator!=(const Iterator &it) const;
311
312 private:
314 };
316
318
319 /**
320 * add a header.
321 */
322 int add(const char *key, const char *value);
323
324 /**
325 * get a header.
326 */
327 const char *get(const char *key) const;
328
329 Iterator begin();
330 Iterator end();
331
332 private:
333 struct impl;
334 struct iterator;
335
336 HttpHeaders(std::unique_ptr<impl> &&impl);
337
338 friend class HttpRequest;
339
340 std::unique_ptr<impl> pImpl_;
341};
342
343/**
344 * a Buffer to send/read from network.
345 *
346 * - memory buffer
347 * - file
348 *
349 * wraps evbuffer
350 */
352 public:
354
356
357 /**
358 * add a memory buffer.
359 */
360 void add(const char *data, size_t data_size);
361
362 /**
363 * add a file.
364 */
365 void add_file(int file_fd, off_t offset, off_t size);
366
367 /**
368 * get length of buffer.
369 */
370 size_t length() const;
371
372 /**
373 * move a subset out from the front of the buffer.
374 */
375 std::vector<uint8_t> pop_front(size_t length);
376
377 private:
378 struct impl;
379
380 HttpBuffer(std::unique_ptr<impl> &&buffer);
381
382 std::unique_ptr<impl> pImpl_;
383
384 friend class HttpRequest;
385};
386
387/**
388 * representation of HTTP URI.
389 *
390 * wraps evhttp_uri and exposes a subset of the libevent function-set
391 */
393 public:
394 HttpUri();
397
398 /**
399 * create HttpUri from string.
400
401 */
402 static std::string decode(const std::string &uri_str, const bool decode_plus);
403 static HttpUri parse(const std::string &uri_str);
404
405 /**
406 * convert URI to string.
407 */
408 std::string join() const;
409
410 std::string get_scheme() const;
411 void set_scheme(const std::string &scheme);
412
413 std::string get_userinfo() const;
414 void set_userinfo(const std::string &userinfo);
415
416 std::string get_host() const;
417 void set_host(const std::string &host);
418
419 uint16_t get_port() const;
420 void set_port(uint16_t port) const;
421
422 /**
423 * get path part of the URI.
424 */
425 std::string get_path() const;
426 void set_path(const std::string &path);
427
428 std::string get_fragment() const;
429 void set_fragment(const std::string &fragment);
430
431 std::string get_query() const;
432 void set_query(const std::string &query);
433
434 /**
435 * check if URI is valid.
436 */
437 operator bool() const;
438
439 private:
440 struct impl;
441
442 HttpUri(std::unique_ptr<impl> &&uri);
443
444 std::unique_ptr<impl> pImpl_;
445
446 friend class HttpRequest;
447};
448
449/**
450 * a HTTP request and response.
451 *
452 * wraps evhttp_request
453 */
455 public:
456 using RequestHandler = void (*)(HttpRequest *, void *);
457
458 HttpRequest(RequestHandler cb, void *arg = nullptr);
461
462 HttpHeaders get_output_headers();
463 HttpHeaders get_input_headers() const;
464 HttpBuffer get_output_buffer();
465 HttpBuffer get_input_buffer() const;
466
467 unsigned get_response_code() const;
468 std::string get_response_code_line() const;
469
470 HttpMethod::type get_method() const;
471
472 HttpUri get_uri() const;
473
474 void send_reply(int status_code) {
475 send_reply(status_code,
477 }
478 void send_reply(int status_code, std::string status_text);
479 void send_reply(int status_code, std::string status_text, HttpBuffer &buffer);
480
481 void send_error(int status_code) {
482 send_error(status_code,
484 }
485 void send_error(int status_code, std::string status_text);
486
487 static void sync_callback(HttpRequest *, void *);
488
489 operator bool() const;
490
491 int error_code();
492 void error_code(int);
493 std::string error_msg();
494
495 std::error_code socket_error_code() const;
496 void socket_error_code(std::error_code ec);
497
498 /**
499 * is request modified since 'last_modified'.
500 *
501 * @return true, if local content is newer than the clients last known date,
502 * false otherwise
503 */
504 bool is_modified_since(time_t last_modified);
505
506 /**
507 * add a Last-Modified-Since header to the response headers.
508 */
509 bool add_last_modified(time_t last_modified);
510
511 private:
512 class impl;
513
514 HttpRequest(std::unique_ptr<impl> &&impl);
515
516 std::unique_ptr<impl> pImpl_;
517
519 friend class HttpUri;
520 friend class EventHttp;
521};
522
523/**
524 * Http server build on top of `EventBase`.
525 */
527 public:
528 using CallbackRequest = void (*)(HttpRequest *, void *);
529 using CallbackBuffer = EventBuffer (*)(EventBase *, void *);
531
533 // Because of the pimpl, this can't be default
536
537 public:
538 /**
539 * Set allowed methods for client request.
540 *
541 * Limit the number of methods that HTTP client can send to `this`
542 * HTTP server, which will be forward to callback specified in
543 * `set_gencb`.
544 */
545 void set_allowed_http_methods(const HttpMethod::Bitset methods);
546
547 /**
548 * Accept HTTP connection on specific socket.
549 */
550 EventHttpBoundSocket accept_socket_with_handle(const SocketHandle fd);
551
552 /**
553 * Set HTTP request callback.
554 */
555 void set_gencb(CallbackRequest cb, void *cbarg);
556
557 /**
558 * Set callback to create EventBuffer for new HTTP connection.
559 */
560 void set_bevcb(CallbackBuffer cb, void *cbarg);
561
562 private:
563 struct impl;
564
565 std::unique_ptr<impl> pImpl_;
566};
567
568/**
569 * canonicalize a URI path.
570 *
571 * input | output
572 * -------|-------
573 * / | /
574 * /./ | /
575 * // | /
576 * /../ | /
577 * /a/../ | /
578 * /../a/ | /a/
579 * /../a | /a
580 */
582 const std::string &uri_path);
583
584// http_time.cc
585
586/**
587 * convert a Date: header into a time_t.
588 *
589 * @return a time_t representation of Date: header value
590 * @throws std::out_of_range on invalid formats
591 */
592HTTP_COMMON_EXPORT time_t time_from_rfc5322_fixdate(const char *date_buf);
593
594/**
595 * convert time_t into a Date: header value.
596 *
597 */
598HTTP_COMMON_EXPORT int time_to_rfc5322_fixdate(time_t ts, char *date_buf,
599 size_t date_buf_len);
600
601#endif // MYSQLROUTER_HTTP_REQUEST_INCLUDED
A simple bitset wrapper class, which lets you access an existing range of bytes (not owned by it!...
Definition: ut0bitset.h:54
Main event registration and dispatch engine
Definition: http_common.h:115
Enables bufforing of I/O for a socket.
Definition: http_common.h:200
Http bound socket.
Definition: http_request.h:287
BoundHandle handle_
Definition: http_request.h:295
void * BoundHandle
Definition: http_request.h:289
EventHttpBoundSocket(BoundHandle handle)
Definition: http_request.h:290
bool is_valid() const
Definition: http_request.h:292
Http server build on top of EventBase.
Definition: http_request.h:526
std::unique_ptr< impl > pImpl_
Definition: http_request.h:563
void(*)(HttpRequest *, void *) CallbackRequest
Definition: http_request.h:528
net::impl::socket::native_handle_type SocketHandle
Definition: http_request.h:530
EventBuffer(*)(EventBase *, void *) CallbackBuffer
Definition: http_request.h:529
a Buffer to send/read from network.
Definition: http_request.h:351
std::unique_ptr< impl > pImpl_
Definition: http_request.h:382
HttpBuffer(HttpBuffer &&)
Definition: http_client.h:65
Definition: http_request.h:303
void * IteratorHandle
Definition: http_request.h:305
IteratorHandle node_
Definition: http_request.h:313
Iterator(IteratorHandle node)
Definition: http_request.h:306
headers of a HTTP response/request.
Definition: http_request.h:301
std::unique_ptr< impl > pImpl_
Definition: http_request.h:340
HttpHeaders(HttpHeaders &&)
a HTTP request and response.
Definition: http_request.h:454
void(*)(HttpRequest *, void *) RequestHandler
Definition: http_request.h:456
void send_error(int status_code)
Definition: http_request.h:481
std::unique_ptr< impl > pImpl_
Definition: http_request.h:516
void send_reply(int status_code)
Definition: http_request.h:474
representation of HTTP URI.
Definition: http_request.h:392
HttpUri(HttpUri &&)
std::unique_ptr< impl > pImpl_
Definition: http_request.h:444
This class is used to trace function calls and other process information.
Definition: semisync.h:43
#define HTTP_COMMON_EXPORT
Definition: http_common_export.h:40
HTTP_COMMON_EXPORT std::string http_uri_path_canonicalize(const std::string &uri_path)
canonicalize a URI path.
Definition: http_common.cc:415
HTTP_COMMON_EXPORT time_t time_from_rfc5322_fixdate(const char *date_buf)
convert a Date: header into a time_t.
Definition: http_time.cc:76
HTTP_COMMON_EXPORT int time_to_rfc5322_fixdate(time_t ts, char *date_buf, size_t date_buf_len)
convert time_t into a Date: header value.
Definition: http_time.cc:37
static std::string to_string(const LEX_STRING &str)
Definition: lex_string.h:50
bool operator!=(const my_thread_handle &a, const my_thread_handle &b)
Definition: my_thread.h:158
static char * query
Definition: myisam_ftdump.cc:45
const char * host
Definition: mysqladmin.cc:59
static char * path
Definition: mysqldump.cc:137
constexpr pos_type Options
Definition: http_request.h:262
constexpr pos_type Connect
Definition: http_request.h:264
constexpr pos_type Patch
Definition: http_request.h:265
constexpr pos_type Head
Definition: http_request.h:259
constexpr pos_type Get
Definition: http_request.h:257
constexpr pos_type _LAST
Definition: http_request.h:267
constexpr pos_type Put
Definition: http_request.h:260
constexpr pos_type Delete
Definition: http_request.h:261
constexpr pos_type Post
Definition: http_request.h:258
constexpr pos_type Trace
Definition: http_request.h:263
Definition: http_request.h:253
constexpr type Get
Definition: http_request.h:271
std::bitset< Pos::_LAST+1 > Bitset
Definition: http_request.h:269
constexpr type Delete
Definition: http_request.h:275
int type
Definition: http_request.h:254
constexpr type Options
Definition: http_request.h:276
unsigned pos_type
Definition: http_request.h:255
constexpr type Patch
Definition: http_request.h:279
constexpr type Connect
Definition: http_request.h:278
constexpr type Post
Definition: http_request.h:272
constexpr type Head
Definition: http_request.h:273
constexpr type Put
Definition: http_request.h:274
Definition: http_request.h:49
constexpr key_type PermanentRedirect
Definition: http_request.h:76
constexpr key_type ResetContent
Definition: http_request.h:63
constexpr key_type Gone
Definition: http_request.h:88
constexpr key_type Processing
Definition: http_request.h:55
constexpr key_type VariantAlsoNegotiates
Definition: http_request.h:113
int key_type
Definition: http_request.h:51
constexpr key_type ExpectationFailed
Definition: http_request.h:95
constexpr key_type PreconditionFailed
Definition: http_request.h:90
constexpr key_type RequestHeaderFieldsTooLarge
Definition: http_request.h:104
constexpr key_type InternalError
Definition: http_request.h:107
constexpr key_type UnsupportedMediaType
Definition: http_request.h:93
constexpr key_type MethodNotAllowed
Definition: http_request.h:83
constexpr key_type EarlyHints
Definition: http_request.h:56
constexpr key_type Continue
Definition: http_request.h:53
constexpr key_type MovedPermanently
Definition: http_request.h:70
constexpr key_type HTTPVersionNotSupported
Definition: http_request.h:112
constexpr key_type InstanceManipulationUsed
Definition: http_request.h:67
constexpr key_type NotExtended
Definition: http_request.h:116
constexpr key_type Accepted
Definition: http_request.h:60
constexpr key_type FailedDependency
Definition: http_request.h:100
constexpr key_type RequestTimeout
Definition: http_request.h:86
constexpr key_type MisdirectedRequest
Definition: http_request.h:97
constexpr key_type NoContent
Definition: http_request.h:62
constexpr key_type BadRequest
Definition: http_request.h:78
constexpr key_type LengthRequired
Definition: http_request.h:89
constexpr key_type UpgradeRequired
Definition: http_request.h:101
constexpr key_type GatewayTimeout
Definition: http_request.h:111
constexpr key_type SeeOther
Definition: http_request.h:72
constexpr key_type UnavailableForLegalReasons
Definition: http_request.h:105
constexpr key_type PartialContent
Definition: http_request.h:64
constexpr key_type Forbidden
Definition: http_request.h:81
constexpr key_type IamaTeapot
Definition: http_request.h:96
constexpr key_type MultipleChoices
Definition: http_request.h:69
constexpr key_type BadGateway
Definition: http_request.h:109
constexpr key_type NetworkAuthorizationRequired
Definition: http_request.h:117
constexpr key_type Created
Definition: http_request.h:59
constexpr key_type NotAcceptable
Definition: http_request.h:84
constexpr key_type Conflicts
Definition: http_request.h:87
constexpr key_type NotImplemented
Definition: http_request.h:108
constexpr key_type Found
Definition: http_request.h:71
constexpr key_type SwitchingProtocols
Definition: http_request.h:54
constexpr key_type UnprocessableEntity
Definition: http_request.h:98
name_type get_default_status_text(key_type key)
Definition: http_request.h:119
constexpr key_type Ok
Definition: http_request.h:58
constexpr key_type Locked
Definition: http_request.h:99
constexpr key_type RangeNotSatisfiable
Definition: http_request.h:94
constexpr key_type Unauthorized
Definition: http_request.h:79
constexpr key_type InsufficientStorage
Definition: http_request.h:114
constexpr key_type MultiStatus
Definition: http_request.h:65
constexpr key_type ProxyAuthenticationRequired
Definition: http_request.h:85
constexpr key_type PreconditionRequired
Definition: http_request.h:102
constexpr key_type TooManyRequests
Definition: http_request.h:103
const char * name_type
Definition: http_request.h:50
constexpr key_type ServiceUnavailable
Definition: http_request.h:110
constexpr key_type TemporaryRedirect
Definition: http_request.h:75
constexpr key_type PayloadTooLarge
Definition: http_request.h:91
constexpr key_type NotFound
Definition: http_request.h:82
constexpr key_type URITooLarge
Definition: http_request.h:92
constexpr key_type LoopDetected
Definition: http_request.h:115
constexpr key_type PaymentRequired
Definition: http_request.h:80
constexpr key_type NonAuthoritiveInformation
Definition: http_request.h:61
constexpr key_type UseProxy
Definition: http_request.h:74
constexpr key_type NotModified
Definition: http_request.h:73
constexpr key_type AlreadyReported
Definition: http_request.h:66
stdx::expected< std::pair< size_t, T >, std::error_code > decode(const net::const_buffer &buffer, capabilities::value_type caps)
decode a message from a buffer.
Definition: classic_protocol_codec_base.h:119
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
Definition: authentication.cc:36
std::string join(Container cont, const std::string &delim)
join elements of an container into a string separated by a delimiter.
Definition: string.h:151
int native_handle_type
Definition: socket_constants.h:51
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:420
void get(PSI_field *, PSI_longlong *) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:32
static mysql_service_status_t add(reference_caching_channel channel, const char *implementation_name) noexcept
Definition: component.cc:135
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
static int handle(int sql_errno, const char *sqlstate, const char *message, void *state)
Bridge function between the C++ API offered by this module and the C API of the parser service.
Definition: services.cc:64
bool parse(MYSQL_THD thd, const string &query, bool is_prepared, Condition_handler *handler)
Definition: services.cc:81
required string key
Definition: replication_asynchronous_connection_failover.proto:60
required uint64 port
Definition: replication_asynchronous_connection_failover.proto:33
Ssl_acceptor_context_property_type & operator++(Ssl_acceptor_context_property_type &property_type)
Increment operator for Ssl_acceptor_context_type Used by iterator.
Definition: ssl_acceptor_context_data.cc:114