|
Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
|
Classes | |
| struct | HeaderBlock |
| Owns the header name/value strings backing an nghttp2_nv list. More... | |
Functions | |
| HeaderBlock | build_response_headers (const http::HttpResponse &response) |
| Builds the HTTP/2 response header list for a response. | |
| bool | parse_method (std::string_view value, http::HttpMethod &out) |
Maps an HTTP/2 :method pseudo-header value to an HttpMethod. | |
| bool | is_connection_specific_header (std::string_view name) |
| True if a header is forbidden in HTTP/2 and must not be forwarded. | |
| bool | apply_request_target (std::string_view target, http::HttpRequest &req) |
Fills req.uri (the decoded path), req.target and req.query from a request target such as an HTTP/2 or HTTP/3 :path, decoding it as the HTTP/1.1 parser does. | |
| void | parse_cookies (std::string_view cookies, http::HttpRequest &req) |
| Adds the name=value pairs of a Cookie header value to req.cookies. | |
| bool orbit::http::h2::detail::apply_request_target | ( | std::string_view | target, |
| http::HttpRequest & | req | ||
| ) |
Fills req.uri (the decoded path), req.target and req.query from a request target such as an HTTP/2 or HTTP/3 :path, decoding it as the HTTP/1.1 parser does.
| HeaderBlock orbit::http::h2::detail::build_response_headers | ( | const http::HttpResponse & | response | ) |
Builds the HTTP/2 response header list for a response.
Emits the mandatory :status pseudo-header first, then each response header with its name lowercased as HTTP/2 requires. Connection-specific headers that are forbidden in HTTP/2 (RFC 9113 section 8.2.2) are dropped.
| response | The response whose headers should be encoded. |
| bool orbit::http::h2::detail::is_connection_specific_header | ( | std::string_view | name | ) |
True if a header is forbidden in HTTP/2 and must not be forwarded.
| name | The header name, in any case. |
| void orbit::http::h2::detail::parse_cookies | ( | std::string_view | cookies, |
| http::HttpRequest & | req | ||
| ) |
Adds the name=value pairs of a Cookie header value to req.cookies.
| bool orbit::http::h2::detail::parse_method | ( | std::string_view | value, |
| http::HttpMethod & | out | ||
| ) |
Maps an HTTP/2 :method pseudo-header value to an HttpMethod.
| value | The :method value as received on the wire. |
| out | Set to the parsed method on success; untouched on failure. |