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