MySQL 8.0.37
Source Code Documentation
http_request.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2021, 2024, 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 <ctime>
33#include <functional> // std::function
34#include <memory>
35#include <stdexcept>
36#include <string>
37#include <system_error>
38#include <vector>
39
41
42// http_common.cc
43
44class EventBase;
45class EventBuffer;
46
47// https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
48namespace HttpStatusCode {
49using name_type = const char *;
50using key_type = int;
51
52constexpr key_type Continue = 100; // RFC 7231
53constexpr key_type SwitchingProtocols = 101; // RFC 7231
54constexpr key_type Processing = 102; // RFC 2518
55constexpr key_type EarlyHints = 103; // RFC 8297
56
57constexpr key_type Ok = 200; // RFC 7231
58constexpr key_type Created = 201; // RFC 7231
59constexpr key_type Accepted = 202; // RFC 7231
60constexpr key_type NonAuthoritiveInformation = 203; // RFC 7231
61constexpr key_type NoContent = 204; // RFC 7231
62constexpr key_type ResetContent = 205; // RFC 7231
63constexpr key_type PartialContent = 206; // RFC 7233
64constexpr key_type MultiStatus = 207; // RFC 4918
65constexpr key_type AlreadyReported = 208; // RFC 5842
66constexpr key_type InstanceManipulationUsed = 226; // RFC 3229
67
68constexpr key_type MultipleChoices = 300; // RFC 7231
69constexpr key_type MovedPermanently = 301; // RFC 7231
70constexpr key_type Found = 302; // RFC 7231
71constexpr key_type SeeOther = 303; // RFC 7231
72constexpr key_type NotModified = 304; // RFC 7232
73constexpr key_type UseProxy = 305; // RFC 7231
74constexpr key_type TemporaryRedirect = 307; // RFC 7231
75constexpr key_type PermanentRedirect = 308; // RFC 7538
76
77constexpr key_type BadRequest = 400; // RFC 7231
78constexpr key_type Unauthorized = 401; // RFC 7235
79constexpr key_type PaymentRequired = 402; // RFC 7231
80constexpr key_type Forbidden = 403; // RFC 7231
81constexpr key_type NotFound = 404; // RFC 7231
82constexpr key_type MethodNotAllowed = 405; // RFC 7231
83constexpr key_type NotAcceptable = 406; // RFC 7231
84constexpr key_type ProxyAuthenticationRequired = 407; // RFC 7235
85constexpr key_type RequestTimeout = 408; // RFC 7231
86constexpr key_type Conflicts = 409; // RFC 7231
87constexpr key_type Gone = 410; // RFC 7231
88constexpr key_type LengthRequired = 411; // RFC 7231
89constexpr key_type PreconditionFailed = 412; // RFC 7232
90constexpr key_type PayloadTooLarge = 413; // RFC 7231
91constexpr key_type URITooLarge = 414; // RFC 7231
92constexpr key_type UnsupportedMediaType = 415; // RFC 7231
93constexpr key_type RangeNotSatisfiable = 416; // RFC 7233
94constexpr key_type ExpectationFailed = 417; // RFC 7231
95constexpr key_type IamaTeapot = 418; // RFC 7168
96constexpr key_type MisdirectedRequest = 421; // RFC 7540
97constexpr key_type UnprocessableEntity = 422; // RFC 4918
98constexpr key_type Locked = 423; // RFC 4918
99constexpr key_type FailedDependency = 424; // RFC 4918
100constexpr key_type UpgradeRequired = 426; // RFC 7231
101constexpr key_type PreconditionRequired = 428; // RFC 6585
102constexpr key_type TooManyRequests = 429; // RFC 6585
103constexpr key_type RequestHeaderFieldsTooLarge = 431; // RFC 6585
104constexpr key_type UnavailableForLegalReasons = 451; // RFC 7725
105
106constexpr key_type InternalError = 500; // RFC 7231
107constexpr key_type NotImplemented = 501; // RFC 7231
108constexpr key_type BadGateway = 502; // RFC 7231
109constexpr key_type ServiceUnavailable = 503; // RFC 7231
110constexpr key_type GatewayTimeout = 504; // RFC 7231
111constexpr key_type HTTPVersionNotSupported = 505; // RFC 7231
112constexpr key_type VariantAlsoNegotiates = 506; // RFC 2295
113constexpr key_type InsufficientStorage = 507; // RFC 4918
114constexpr key_type LoopDetected = 508; // RFC 5842
115constexpr key_type NotExtended = 510; // RFC 2774
116constexpr key_type NetworkAuthorizationRequired = 511; // RFC 6585
117
119 switch (key) {
120 case Continue:
121 return "Continue";
123 return "Switching Protocols";
124 case Processing:
125 return "Processing";
126 case EarlyHints:
127 return "Early Hints";
128
129 case Ok:
130 return "Ok";
131 case Created:
132 return "Created";
133 case Accepted:
134 return "Accepted";
136 return "Non Authoritive Information";
137 case NoContent:
138 return "No Content";
139 case ResetContent:
140 return "Reset Content";
141 case PartialContent:
142 return "Partial Content";
143 case MultiStatus:
144 return "Multi Status";
145 case AlreadyReported:
146 return "Already Reported";
148 return "IMUsed";
149
150 case MultipleChoices:
151 return "Multiple Choices";
152 case MovedPermanently:
153 return "Moved Permanently";
154 case Found:
155 return "Found";
156 case SeeOther:
157 return "See Other";
158 case NotModified:
159 return "Not Modified";
160 case UseProxy:
161 return "Use Proxy";
163 return "Temporary Redirect";
165 return "Permanent Redirect";
166
167 case BadRequest:
168 return "Bad Request";
169 case Unauthorized:
170 return "Unauthorized";
171 case PaymentRequired:
172 return "Payment Required";
173 case Forbidden:
174 return "Forbidden";
175 case NotFound:
176 return "Not Found";
177 case MethodNotAllowed:
178 return "Method Not Allowed";
179 case NotAcceptable:
180 return "Not NotAcceptable";
182 return "Proxy Authentication Required";
183 case RequestTimeout:
184 return "Request Timeout";
185 case Conflicts:
186 return "Conflicts";
187 case Gone:
188 return "Gone";
189 case LengthRequired:
190 return "Length Required";
192 return "Precondition Failed";
193 case PayloadTooLarge:
194 return "Payload Too Large";
195 case URITooLarge:
196 return "URITooLarge";
198 return "Unsupported MediaType";
200 return "Range Not Satisfiable";
202 return "Expectation Failed";
203 case IamaTeapot:
204 return "I am a Teapot";
206 return "Misdirected Request";
208 return "Unprocessable Entity";
209 case Locked:
210 return "Locked";
211 case FailedDependency:
212 return "Failed Dependency";
213 case UpgradeRequired:
214 return "Upgrade Required";
216 return "Precondition Required";
217 case TooManyRequests:
218 return "Too Many Requests";
220 return "Request Header Fields Too Large";
222 return "Unavailable For Legal Reasons";
223
224 case InternalError:
225 return "Internal Error";
226 case NotImplemented:
227 return "Not Implemented";
228 case BadGateway:
229 return "Bad Gateway";
231 return "Service Unavailable";
232 case GatewayTimeout:
233 return "Gateway Timeout";
235 return "HTTP Version Not Supported";
237 return "Variant Also Negotiates";
239 return "Insufficient Storage";
240 case LoopDetected:
241 return "Loop Detected";
242 case NotExtended:
243 return "Not Extended";
245 return "Network Authorization Required";
246 default:
247 throw std::logic_error("no text for HTTP Status " + std::to_string(key));
248 }
249}
250} // namespace HttpStatusCode
251
252namespace HttpMethod {
253using type = int;
254using pos_type = unsigned;
255namespace Pos {
256constexpr pos_type Get = 0;
257constexpr pos_type Post = 1;
258constexpr pos_type Head = 2;
259constexpr pos_type Put = 3;
260constexpr pos_type Delete = 4;
261constexpr pos_type Options = 5;
262constexpr pos_type Trace = 6;
263constexpr pos_type Connect = 7;
264constexpr pos_type Patch = 8;
265
266constexpr pos_type _LAST = Patch;
267} // namespace Pos
268using Bitset = std::bitset<Pos::_LAST + 1>;
269
270constexpr type Get{1 << Pos::Get};
271constexpr type Post{1 << Pos::Post};
272constexpr type Head{1 << Pos::Head};
273constexpr type Put{1 << Pos::Put};
274constexpr type Delete{1 << Pos::Delete};
275constexpr type Options{1 << Pos::Options};
276constexpr type Trace{1 << Pos::Trace};
277constexpr type Connect{1 << Pos::Connect};
278constexpr type Patch{1 << Pos::Patch};
279} // namespace HttpMethod
280
281/**
282 * Http bound socket
283 *
284 * Wrapper for `evhttp_bound_socket` structure from `libevent`.
285 */
287 public:
288 using BoundHandle = void *;
290
291 bool is_valid() const { return handle_ != nullptr; }
292
293 private:
295};
296
297/**
298 * headers of a HTTP response/request.
299 */
301 public:
303 public:
304 using IteratorHandle = void *;
305 Iterator(IteratorHandle node) : node_{node} {}
306
307 std::pair<std::string, std::string> operator*();
309 bool operator!=(const Iterator &it) const;
310
311 private:
313 };
315
317
318 /**
319 * add a header.
320 */
321 int add(const char *key, const char *value);
322
323 /**
324 * get a header.
325 */
326 const char *get(const char *key) const;
327
328 Iterator begin();
329 Iterator end();
330
331 private:
332 struct impl;
333 struct iterator;
334
335 HttpHeaders(std::unique_ptr<impl> &&impl);
336
337 friend class HttpRequest;
338
339 std::unique_ptr<impl> pImpl_;
340};
341
342/**
343 * a Buffer to send/read from network.
344 *
345 * - memory buffer
346 * - file
347 *
348 * wraps evbuffer
349 */
351 public:
353
355
356 /**
357 * add a memory buffer.
358 */
359 void add(const char *data, size_t data_size);
360
361 /**
362 * add a file.
363 */
364 void add_file(int file_fd, off_t offset, off_t size);
365
366 /**
367 * get length of buffer.
368 */
369 size_t length() const;
370
371 /**
372 * move a subset out from the front of the buffer.
373 */
374 std::vector<uint8_t> pop_front(size_t length);
375
376 private:
377 struct impl;
378
379 HttpBuffer(std::unique_ptr<impl> &&buffer);
380
381 std::unique_ptr<impl> pImpl_;
382
383 friend class HttpRequest;
384};
385
386/**
387 * representation of HTTP URI.
388 *
389 * wraps evhttp_uri and exposes a subset of the libevent function-set
390 */
392 public:
393 HttpUri();
396
397 /**
398 * create HttpUri from string.
399
400 */
401 static std::string decode(const std::string &uri_str, const bool decode_plus);
402 static HttpUri parse(const std::string &uri_str);
403
404 /**
405 * convert URI to string.
406 */
407 std::string join() const;
408
409 std::string get_scheme() const;
410 void set_scheme(const std::string &scheme);
411
412 std::string get_userinfo() const;
413 void set_userinfo(const std::string &userinfo);
414
415 std::string get_host() const;
416 void set_host(const std::string &host);
417
418 uint16_t get_port() const;
419 void set_port(uint16_t port) const;
420
421 /**
422 * get path part of the URI.
423 */
424 std::string get_path() const;
425 void set_path(const std::string &path);
426
427 std::string get_fragment() const;
428 void set_fragment(const std::string &fragment);
429
430 std::string get_query() const;
431 void set_query(const std::string &query);
432
433 /**
434 * check if URI is valid.
435 */
436 operator bool() const;
437
438 private:
439 struct impl;
440
441 HttpUri(std::unique_ptr<impl> &&uri);
442
443 std::unique_ptr<impl> pImpl_;
444
445 friend class HttpRequest;
446};
447
448/**
449 * a HTTP request and response.
450 *
451 * wraps evhttp_request
452 */
454 public:
455 using RequestHandler = void (*)(HttpRequest *, void *);
456
457 HttpRequest(RequestHandler cb, void *arg = nullptr);
460
461 HttpHeaders get_output_headers();
462 HttpHeaders get_input_headers() const;
463 HttpBuffer get_output_buffer();
464 HttpBuffer get_input_buffer() const;
465
466 unsigned get_response_code() const;
467 std::string get_response_code_line() const;
468
469 HttpMethod::type get_method() const;
470
471 HttpUri get_uri() const;
472
473 void send_reply(int status_code) {
474 send_reply(status_code,
476 }
477 void send_reply(int status_code, std::string status_text);
478 void send_reply(int status_code, std::string status_text, HttpBuffer &buffer);
479
480 void send_error(int status_code) {
481 send_error(status_code,
483 }
484 void send_error(int status_code, std::string status_text);
485
486 static void sync_callback(HttpRequest *, void *);
487
488 operator bool() const;
489
490 int error_code();
491 void error_code(int);
492 std::string error_msg();
493
494 std::error_code socket_error_code() const;
495 void socket_error_code(std::error_code ec);
496
497 /**
498 * is request modified since 'last_modified'.
499 *
500 * @return true, if local content is newer than the clients last known date,
501 * false otherwise
502 */
503 bool is_modified_since(time_t last_modified);
504
505 /**
506 * add a Last-Modified-Since header to the response headers.
507 */
508 bool add_last_modified(time_t last_modified);
509
510 private:
511 class impl;
512
513 HttpRequest(std::unique_ptr<impl> &&impl);
514
515 std::unique_ptr<impl> pImpl_;
516
518 friend class HttpUri;
519 friend class EventHttp;
520};
521
522/**
523 * Http server build on top of `EventBase`.
524 */
526 public:
527 using CallbackRequest = void (*)(HttpRequest *, void *);
528 using CallbackBuffer = EventBuffer (*)(EventBase *, void *);
530
532 // Because of the pimpl, this can't be default
535
536 public:
537 /**
538 * Set allowed methods for client request.
539 *
540 * Limit the number of methods that HTTP client can send to `this`
541 * HTTP server, which will be forward to callback specified in
542 * `set_gencb`.
543 */
544 void set_allowed_http_methods(const HttpMethod::Bitset methods);
545
546 /**
547 * Accept HTTP connection on specific socket.
548 */
549 EventHttpBoundSocket accept_socket_with_handle(const SocketHandle fd);
550
551 /**
552 * Set HTTP request callback.
553 */
554 void set_gencb(CallbackRequest cb, void *cbarg);
555
556 /**
557 * Set callback to create EventBuffer for new HTTP connection.
558 */
559 void set_bevcb(CallbackBuffer cb, void *cbarg);
560
561 private:
562 struct impl;
563
564 std::unique_ptr<impl> pImpl_;
565};
566
567/**
568 * canonicalize a URI path.
569 *
570 * input | output
571 * -------|-------
572 * / | /
573 * /./ | /
574 * // | /
575 * /../ | /
576 * /a/../ | /
577 * /../a/ | /a/
578 * /../a | /a
579 */
581 const std::string &uri_path);
582
583// http_time.cc
584
585/**
586 * convert a Date: header into a time_t.
587 *
588 * @return a time_t representation of Date: header value
589 * @throws std::out_of_range on invalid formats
590 */
591HTTP_COMMON_EXPORT time_t time_from_rfc5322_fixdate(const char *date_buf);
592
593/**
594 * convert time_t into a Date: header value.
595 *
596 */
597HTTP_COMMON_EXPORT int time_to_rfc5322_fixdate(time_t ts, char *date_buf,
598 size_t date_buf_len);
599
600#endif // MYSQLROUTER_HTTP_REQUEST_INCLUDED
A simple bitset wrapper class, whose size can be specified after the object has been defined.
Definition: ut0bitset.h:39
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:286
BoundHandle handle_
Definition: http_request.h:294
void * BoundHandle
Definition: http_request.h:288
EventHttpBoundSocket(BoundHandle handle)
Definition: http_request.h:289
bool is_valid() const
Definition: http_request.h:291
Http server build on top of EventBase.
Definition: http_request.h:525
std::unique_ptr< impl > pImpl_
Definition: http_request.h:562
void(*)(HttpRequest *, void *) CallbackRequest
Definition: http_request.h:527
net::impl::socket::native_handle_type SocketHandle
Definition: http_request.h:529
EventBuffer(*)(EventBase *, void *) CallbackBuffer
Definition: http_request.h:528
a Buffer to send/read from network.
Definition: http_request.h:350
std::unique_ptr< impl > pImpl_
Definition: http_request.h:381
HttpBuffer(HttpBuffer &&)
Definition: http_client.h:65
Definition: http_request.h:302
void * IteratorHandle
Definition: http_request.h:304
IteratorHandle node_
Definition: http_request.h:312
Iterator(IteratorHandle node)
Definition: http_request.h:305
headers of a HTTP response/request.
Definition: http_request.h:300
std::unique_ptr< impl > pImpl_
Definition: http_request.h:339
HttpHeaders(HttpHeaders &&)
a HTTP request and response.
Definition: http_request.h:453
void(*)(HttpRequest *, void *) RequestHandler
Definition: http_request.h:455
void send_error(int status_code)
Definition: http_request.h:480
std::unique_ptr< impl > pImpl_
Definition: http_request.h:515
void send_reply(int status_code)
Definition: http_request.h:473
representation of HTTP URI.
Definition: http_request.h:391
HttpUri(HttpUri &&)
std::unique_ptr< impl > pImpl_
Definition: http_request.h:443
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:261
constexpr pos_type Connect
Definition: http_request.h:263
constexpr pos_type Patch
Definition: http_request.h:264
constexpr pos_type Head
Definition: http_request.h:258
constexpr pos_type Get
Definition: http_request.h:256
constexpr pos_type _LAST
Definition: http_request.h:266
constexpr pos_type Put
Definition: http_request.h:259
constexpr pos_type Delete
Definition: http_request.h:260
constexpr pos_type Post
Definition: http_request.h:257
constexpr pos_type Trace
Definition: http_request.h:262
Definition: http_request.h:252
constexpr type Get
Definition: http_request.h:270
std::bitset< Pos::_LAST+1 > Bitset
Definition: http_request.h:268
constexpr type Delete
Definition: http_request.h:274
int type
Definition: http_request.h:253
constexpr type Options
Definition: http_request.h:275
unsigned pos_type
Definition: http_request.h:254
constexpr type Patch
Definition: http_request.h:278
constexpr type Connect
Definition: http_request.h:277
constexpr type Post
Definition: http_request.h:271
constexpr type Head
Definition: http_request.h:272
constexpr type Put
Definition: http_request.h:273
Definition: http_request.h:48
constexpr key_type PermanentRedirect
Definition: http_request.h:75
constexpr key_type ResetContent
Definition: http_request.h:62
constexpr key_type Gone
Definition: http_request.h:87
constexpr key_type Processing
Definition: http_request.h:54
constexpr key_type VariantAlsoNegotiates
Definition: http_request.h:112
int key_type
Definition: http_request.h:50
constexpr key_type ExpectationFailed
Definition: http_request.h:94
constexpr key_type PreconditionFailed
Definition: http_request.h:89
constexpr key_type RequestHeaderFieldsTooLarge
Definition: http_request.h:103
constexpr key_type InternalError
Definition: http_request.h:106
constexpr key_type UnsupportedMediaType
Definition: http_request.h:92
constexpr key_type MethodNotAllowed
Definition: http_request.h:82
constexpr key_type EarlyHints
Definition: http_request.h:55
constexpr key_type Continue
Definition: http_request.h:52
constexpr key_type MovedPermanently
Definition: http_request.h:69
constexpr key_type HTTPVersionNotSupported
Definition: http_request.h:111
constexpr key_type InstanceManipulationUsed
Definition: http_request.h:66
constexpr key_type NotExtended
Definition: http_request.h:115
constexpr key_type Accepted
Definition: http_request.h:59
constexpr key_type FailedDependency
Definition: http_request.h:99
constexpr key_type RequestTimeout
Definition: http_request.h:85
constexpr key_type MisdirectedRequest
Definition: http_request.h:96
constexpr key_type NoContent
Definition: http_request.h:61
constexpr key_type BadRequest
Definition: http_request.h:77
constexpr key_type LengthRequired
Definition: http_request.h:88
constexpr key_type UpgradeRequired
Definition: http_request.h:100
constexpr key_type GatewayTimeout
Definition: http_request.h:110
constexpr key_type SeeOther
Definition: http_request.h:71
constexpr key_type UnavailableForLegalReasons
Definition: http_request.h:104
constexpr key_type PartialContent
Definition: http_request.h:63
constexpr key_type Forbidden
Definition: http_request.h:80
constexpr key_type IamaTeapot
Definition: http_request.h:95
constexpr key_type MultipleChoices
Definition: http_request.h:68
constexpr key_type BadGateway
Definition: http_request.h:108
constexpr key_type NetworkAuthorizationRequired
Definition: http_request.h:116
constexpr key_type Created
Definition: http_request.h:58
constexpr key_type NotAcceptable
Definition: http_request.h:83
constexpr key_type Conflicts
Definition: http_request.h:86
constexpr key_type NotImplemented
Definition: http_request.h:107
constexpr key_type Found
Definition: http_request.h:70
constexpr key_type SwitchingProtocols
Definition: http_request.h:53
constexpr key_type UnprocessableEntity
Definition: http_request.h:97
name_type get_default_status_text(key_type key)
Definition: http_request.h:118
constexpr key_type Ok
Definition: http_request.h:57
constexpr key_type Locked
Definition: http_request.h:98
constexpr key_type RangeNotSatisfiable
Definition: http_request.h:93
constexpr key_type Unauthorized
Definition: http_request.h:78
constexpr key_type InsufficientStorage
Definition: http_request.h:113
constexpr key_type MultiStatus
Definition: http_request.h:64
constexpr key_type ProxyAuthenticationRequired
Definition: http_request.h:84
constexpr key_type PreconditionRequired
Definition: http_request.h:101
constexpr key_type TooManyRequests
Definition: http_request.h:102
const char * name_type
Definition: http_request.h:49
constexpr key_type ServiceUnavailable
Definition: http_request.h:109
constexpr key_type TemporaryRedirect
Definition: http_request.h:74
constexpr key_type PayloadTooLarge
Definition: http_request.h:90
constexpr key_type NotFound
Definition: http_request.h:81
constexpr key_type URITooLarge
Definition: http_request.h:91
constexpr key_type LoopDetected
Definition: http_request.h:114
constexpr key_type PaymentRequired
Definition: http_request.h:79
constexpr key_type NonAuthoritiveInformation
Definition: http_request.h:60
constexpr key_type UseProxy
Definition: http_request.h:73
constexpr key_type NotModified
Definition: http_request.h:72
constexpr key_type AlreadyReported
Definition: http_request.h:65
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