msgid ""
msgstr ""
"Project-Id-Version: English (Boost Beast Translation (zh_Hans))\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-06-07 18:48+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English <https://insights.cppalliance.org/weblate/projects/"
"boost-beast-documentation-zh_Hans/doc-qbk-04-http-02-message-qbk/en/>\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 2026.5\n"

#. type: section title
#: 10
#, read-only
msgid "Message Containers"
msgstr "Message Containers"

#. type: paragraph
#: 12
#, read-only
msgid ""
"Beast provides a single class template __message__ and some aliases which "
"model HTTP/1 and [@https://tools.ietf.org/html/rfc7540 HTTP/2] messages:"
msgstr ""
"Beast provides a single class template __message__ and some aliases which "
"model HTTP/1 and [@https://tools.ietf.org/html/rfc7540 HTTP/2] messages:"

#. type: table title
#: 17
#, read-only
msgid "Message"
msgstr "Message"

#. type: table cell
#: 17
#, read-only
msgctxt "17"
msgid "Name"
msgstr "Name"

#. type: table cell
#: 17
#, read-only
msgctxt "17"
msgid "Description"
msgstr "Description"

#. type: table cell
#: 17
#, read-only
msgid "__message__"
msgstr "__message__"

#. type: table code
#: 17
#, read-only
msgid ""
"/// An HTTP message\n"
"template<\n"
"bool isRequest,             // `true` for requests, `false` for responses\n"
"class Body,                 // Controls the container and algorithms used "
"for the body\n"
"class Fields = fields>      // The type of container to store the fields\n"
"class message;"
msgstr ""
"/// An HTTP message\n"
"template<\n"
"bool isRequest,             // `true` for requests, `false` for responses\n"
"class Body,                 // Controls the container and algorithms used "
"for the body\n"
"class Fields = fields>      // The type of container to store the fields\n"
"class message;"

#. type: table cell
#: 17
#, read-only
msgid "[link beast.ref.boost__beast__http__request `request`]"
msgstr "[link beast.ref.boost__beast__http__request `request`]"

#. type: table code
#: 17
#, read-only
msgid ""
"/// A typical HTTP request\n"
"template<class Body, class Fields = fields>\n"
"using request = message<true, Body, Fields>;"
msgstr ""
"/// A typical HTTP request\n"
"template<class Body, class Fields = fields>\n"
"using request = message<true, Body, Fields>;"

#. type: table cell
#: 17
#, read-only
msgid "[link beast.ref.boost__beast__http__response `response`]"
msgstr "[link beast.ref.boost__beast__http__response `response`]"

#. type: table code
#: 17
#, read-only
msgid ""
"/// A typical HTTP response\n"
"template<class Body, class Fields = fields>\n"
"using response = message<false, Body, Fields>;"
msgstr ""
"/// A typical HTTP response\n"
"template<class Body, class Fields = fields>\n"
"using response = message<false, Body, Fields>;"

#. type: paragraph
#: 51
#, read-only
msgid ""
"The container offers value semantics including move and copy if supported by "
"__Body__ and __Fields__. User defined template function parameters can "
"accept any message, or can use partial specialization to accept just "
"requests or responses. The default __fields__ is a provided associative "
"container using the standard allocator and supporting modification and "
"inspection of fields. As per __rfc7230__, a non-case-sensitive comparison is "
"used for field names. User defined types for fields are possible. The `Body` "
"type determines the type of the container used to represent the body as well "
"as the algorithms for transferring buffers to and from the container. The "
"library comes with a collection of common body types. As with fields, user "
"defined body types are possible."
msgstr ""
"The container offers value semantics including move and copy if supported by "
"__Body__ and __Fields__. User defined template function parameters can "
"accept any message, or can use partial specialization to accept just "
"requests or responses. The default __fields__ is a provided associative "
"container using the standard allocator and supporting modification and "
"inspection of fields. As per __rfc7230__, a non-case-sensitive comparison is "
"used for field names. User defined types for fields are possible. The `Body` "
"type determines the type of the container used to represent the body as well "
"as the algorithms for transferring buffers to and from the container. The "
"library comes with a collection of common body types. As with fields, user "
"defined body types are possible."

#. type: paragraph
#: 63
#, read-only
msgid ""
"Sometimes it is desired to only work with a header. Beast provides a single "
"class template __header__ and some aliases to model HTTP/1 and HTTP/2 "
"headers:"
msgstr ""
"Sometimes it is desired to only work with a header. Beast provides a single "
"class template __header__ and some aliases to model HTTP/1 and HTTP/2 "
"headers:"

#. type: table title
#: 66
#, read-only
msgid "Header"
msgstr "Header"

#. type: table cell
#: 66
#, read-only
msgctxt "66"
msgid "Name"
msgstr "Name"

#. type: table cell
#: 66
#, read-only
msgctxt "66"
msgid "Description"
msgstr "Description"

#. type: table cell
#: 66
#, read-only
msgid "__header__"
msgstr "__header__"

#. type: table code
#: 66
#, read-only
msgid ""
"/// An HTTP header\n"
"template<\n"
"bool isRequest,             // `true` for requests, `false` for responses\n"
"class Fields = fields>      // The type of container to store the fields\n"
"class header;"
msgstr ""
"/// An HTTP header\n"
"template<\n"
"bool isRequest,             // `true` for requests, `false` for responses\n"
"class Fields = fields>      // The type of container to store the fields\n"
"class header;"

#. type: table cell
#: 66
#, read-only
msgid "[link beast.ref.boost__beast__http__request_header `request_header`]"
msgstr "[link beast.ref.boost__beast__http__request_header `request_header`]"

#. type: table code
#: 66
#, read-only
msgid ""
"/// A typical HTTP request header\n"
"template<class Fields>\n"
"using request_header = header<true, Fields>;"
msgstr ""
"/// A typical HTTP request header\n"
"template<class Fields>\n"
"using request_header = header<true, Fields>;"

#. type: table cell
#: 66
#, read-only
msgid "[link beast.ref.boost__beast__http__response_header `response_header`]"
msgstr "[link beast.ref.boost__beast__http__response_header `response_header`]"

#. type: table code
#: 66
#, read-only
msgid ""
"/// A typical HTTP response header\n"
"template<class Fields>\n"
"using response_header = header<false, Fields>;"
msgstr ""
"/// A typical HTTP response header\n"
"template<class Fields>\n"
"using response_header = header<false, Fields>;"

#. type: paragraph
#: 99
#, read-only
msgid ""
"Requests and responses share the version, fields, and body but have a few "
"members unique to the type. This is implemented by declaring the header "
"classes as partial specializations of `isRequest`. __message__ is derived "
"from __header__; a message may be passed as an argument to a function taking "
"a suitably typed header as a parameter. Additionally, `header` is publicly "
"derived from `Fields`; a message inherits all the member functions of "
"`Fields`. This diagram shows the inheritance relationship between header and "
"message, along with some of the notable differences in members in each "
"partial specialization:"
msgstr ""
"Requests and responses share the version, fields, and body but have a few "
"members unique to the type. This is implemented by declaring the header "
"classes as partial specializations of `isRequest`. __message__ is derived "
"from __header__; a message may be passed as an argument to a function taking "
"a suitably typed header as a parameter. Additionally, `header` is publicly "
"derived from `Fields`; a message inherits all the member functions of "
"`Fields`. This diagram shows the inheritance relationship between header and "
"message, along with some of the notable differences in members in each "
"partial specialization:"

#. type: heading
#: 111
#, read-only
msgid "Body Types"
msgstr "Body Types"

#. type: paragraph
#: 113
#, read-only
msgid ""
"Beast defines the __Body__ concept, which determines both the type of the "
"[link beast.ref.boost__beast__http__message.body `message::body`] member (as "
"seen in the diagram above) and may also include algorithms for transferring "
"buffers in and out. These algorithms are used during parsing and "
"serialization. Users may define their own body types which meet the "
"requirements, or use the ones that come with the library:"
msgstr ""
"Beast defines the __Body__ concept, which determines both the type of the "
"[link beast.ref.boost__beast__http__message.body `message::body`] member (as "
"seen in the diagram above) and may also include algorithms for transferring "
"buffers in and out. These algorithms are used during parsing and "
"serialization. Users may define their own body types which meet the "
"requirements, or use the ones that come with the library:"

#. type: table cell
#: 120
#, read-only
msgid "[link beast.ref.boost__beast__http__buffer_body `buffer_body`]"
msgstr "[link beast.ref.boost__beast__http__buffer_body `buffer_body`]"

#. type: table cell
#: 120
#, read-only
msgid ""
"A body whose [link beast.ref.boost__beast__http__buffer_body__value_type "
"`value_type`] holds a raw pointer and size to a caller-provided buffer. This "
"allows for serialization of body data coming from external sources, and "
"incremental parsing of message body content using a fixed size buffer."
msgstr ""
"A body whose [link beast.ref.boost__beast__http__buffer_body__value_type "
"`value_type`] holds a raw pointer and size to a caller-provided buffer. This "
"allows for serialization of body data coming from external sources, and "
"incremental parsing of message body content using a fixed size buffer."

#. type: table cell
#: 120
#, read-only
msgid ""
"[link beast.ref.boost__beast__http__dynamic_body `dynamic_body`]\n"
"\n"
"[link beast.ref.boost__beast__http__basic_dynamic_body `basic_dynamic_body`]"
msgstr ""
"[link beast.ref.boost__beast__http__dynamic_body `dynamic_body`]\n"
"\n"
"[link beast.ref.boost__beast__http__basic_dynamic_body `basic_dynamic_body`]"

#. type: table cell
#: 120
#, read-only
msgid ""
"A body whose `value_type` is a __DynamicBuffer__. It inherits the insertion "
"complexity of the underlying choice of dynamic buffer. Messages with this "
"body type may be serialized and parsed."
msgstr ""
"A body whose `value_type` is a __DynamicBuffer__. It inherits the insertion "
"complexity of the underlying choice of dynamic buffer. Messages with this "
"body type may be serialized and parsed."

#. type: table cell
#: 120
#, read-only
msgid "[link beast.ref.boost__beast__http__empty_body `empty_body`]"
msgstr "[link beast.ref.boost__beast__http__empty_body `empty_body`]"

#. type: table cell
#: 120
#, read-only
msgid ""
"A special body with an empty `value_type` indicating that the message has no "
"body. Messages with this body may be serialized and parsed; however, body "
"octets received while parsing a message with this body will generate a "
"unique error."
msgstr ""
"A special body with an empty `value_type` indicating that the message has no "
"body. Messages with this body may be serialized and parsed; however, body "
"octets received while parsing a message with this body will generate a "
"unique error."

#. type: table cell
#: 120
#, read-only
msgid ""
"[link beast.ref.boost__beast__http__file_body `file_body`]\n"
"\n"
"[link beast.ref.boost__beast__http__basic_file_body `basic_file_body`]"
msgstr ""
"[link beast.ref.boost__beast__http__file_body `file_body`]\n"
"\n"
"[link beast.ref.boost__beast__http__basic_file_body `basic_file_body`]"

#. type: table cell
#: 120
#, read-only
msgid ""
"This body is represented by a file opened for either reading or writing. "
"Messages with this body may be serialized and parsed. HTTP algorithms will "
"use the open file for reading and writing, for streaming and incremental "
"sends and receives."
msgstr ""
"This body is represented by a file opened for either reading or writing. "
"Messages with this body may be serialized and parsed. HTTP algorithms will "
"use the open file for reading and writing, for streaming and incremental "
"sends and receives."

#. type: table cell
#: 120
#, read-only
msgid "[link beast.ref.boost__beast__http__span_body `span_body`]"
msgstr "[link beast.ref.boost__beast__http__span_body `span_body`]"

#. type: table cell
#: 120
#, read-only
msgid ""
"A body whose `value_type` is a [@boost:/libs/core/doc/html/core/span.html "
"`span`], a non-owning reference to a single linear buffer of bytes. Messages "
"with this body type may be serialized and parsed."
msgstr ""
"A body whose `value_type` is a [@boost:/libs/core/doc/html/core/span.html "
"`span`], a non-owning reference to a single linear buffer of bytes. Messages "
"with this body type may be serialized and parsed."

#. type: table cell
#: 120
#, read-only
msgid ""
"[link beast.ref.boost__beast__http__string_body `string_body`]\n"
"\n"
"[link beast.ref.boost__beast__http__basic_string_body `basic_string_body`]"
msgstr ""
"[link beast.ref.boost__beast__http__string_body `string_body`]\n"
"\n"
"[link beast.ref.boost__beast__http__basic_string_body `basic_string_body`]"

#. type: table cell
#: 120
#, read-only
msgid ""
"A body whose `value_type` is `std::basic_string` or `std::string`. Insertion "
"complexity is amortized constant time, while capacity grows geometrically. "
"Messages with this body type may be serialized and parsed. This is the type "
"of body used in the examples."
msgstr ""
"A body whose `value_type` is `std::basic_string` or `std::string`. Insertion "
"complexity is amortized constant time, while capacity grows geometrically. "
"Messages with this body type may be serialized and parsed. This is the type "
"of body used in the examples."

#. type: table cell
#: 120
#, read-only
msgid "[link beast.ref.boost__beast__http__vector_body `vector_body`]"
msgstr "[link beast.ref.boost__beast__http__vector_body `vector_body`]"

#. type: table cell
#: 120
#, read-only
msgid ""
"A body whose `value_type` is `std::vector`. Insertion complexity is "
"amortized constant time, while capacity grows geometrically. Messages with "
"this body type may be serialized and parsed."
msgstr ""
"A body whose `value_type` is `std::vector`. Insertion complexity is "
"amortized constant time, while capacity grows geometrically. Messages with "
"this body type may be serialized and parsed."

#. type: heading
#: 186
#, read-only
msgid "Usage"
msgstr "Usage"

#. type: paragraph
#: 188
#, read-only
msgid ""
"These examples show how to create and fill in request and response objects: "
"Here we build an [@https://tools.ietf.org/html/rfc7231#section-4.3.1 HTTP "
"GET] request with an empty message body:"
msgstr ""
"These examples show how to create and fill in request and response objects: "
"Here we build an [@https://tools.ietf.org/html/rfc7231#section-4.3.1 HTTP "
"GET] request with an empty message body:"

#. type: table title
#: 193
#, read-only
msgid "Create Request"
msgstr "Create Request"

#. type: table cell
#: 193
#, read-only
msgctxt "193"
msgid "Statements"
msgstr "Statements"

#. type: table cell
#: 193
#, read-only
msgctxt "193"
msgid "Serialized Result"
msgstr "Serialized Result"

#. type: table cell
#: 193
#, read-only
msgid "[http_snippet_2]"
msgstr "[http_snippet_2]"

#. type: table code
#: 193
#, read-only
msgid ""
"GET /index.htm HTTP/1.1\\r\\n\n"
"Accept: text/html\\r\\n\n"
"User-Agent: Beast\\r\\n\n"
"\\r\\n"
msgstr ""
"GET /index.htm HTTP/1.1\\r\\n\n"
"Accept: text/html\\r\\n\n"
"User-Agent: Beast\\r\\n\n"
"\\r\\n"

#. type: paragraph
#: 207
#, read-only
msgid ""
"In this code we create an HTTP response with a status code indicating "
"success. This message has a body with a non-zero length. The function [link "
"beast.ref.boost__beast__http__message.prepare_payload "
"`message::prepare_payload`] automatically sets the Content-Length or "
"Transfer-Encoding field depending on the content and type of the `body` "
"member. Use of this function is optional; these fields may also be set "
"explicitly."
msgstr ""
"In this code we create an HTTP response with a status code indicating "
"success. This message has a body with a non-zero length. The function [link "
"beast.ref.boost__beast__http__message.prepare_payload "
"`message::prepare_payload`] automatically sets the Content-Length or "
"Transfer-Encoding field depending on the content and type of the `body` "
"member. Use of this function is optional; these fields may also be set "
"explicitly."

#. type: table title
#: 214
#, read-only
msgid "Create Response"
msgstr "Create Response"

#. type: table cell
#: 214
#, read-only
msgctxt "214"
msgid "Statements"
msgstr "Statements"

#. type: table cell
#: 214
#, read-only
msgctxt "214"
msgid "Serialized Result"
msgstr "Serialized Result"

#. type: table cell
#: 214
#, read-only
msgid "[http_snippet_3]"
msgstr "[http_snippet_3]"

#. type: table code
#: 214
#, read-only
msgid ""
"HTTP/1.1 200 OK\\r\\n\n"
"Server: Beast\\r\\n\n"
"Content-Length: 13\\r\\n\n"
"\\r\\n\n"
"Hello, world!"
msgstr ""
"HTTP/1.1 200 OK\\r\\n\n"
"Server: Beast\\r\\n\n"
"Content-Length: 13\\r\\n\n"
"\\r\\n\n"
"Hello, world!"

#. type: paragraph
#: 229
#, read-only
msgid ""
"The implementation will automatically fill in the obsolete [@https://"
"tools.ietf.org/html/rfc7230#section-3.1.2 reason-phrase] from the status "
"code when serializing a message. Or it may be set directly using [link "
"beast.ref.boost__beast__http__header.reason.overload2 `header::reason`]."
msgstr ""
"The implementation will automatically fill in the obsolete [@https://"
"tools.ietf.org/html/rfc7230#section-3.1.2 reason-phrase] from the status "
"code when serializing a message. Or it may be set directly using [link "
"beast.ref.boost__beast__http__header.reason.overload2 `header::reason`]."
