Returns `true` if the semantics of the [@https://tools.ietf.org/html/rfc7230#section-6.1 [*Connection]] field and version indicate that the connection should remain open after the corresponding response is transmitted or received: [itemized_list [ If `(v < 11)` the function returns `true` if the "keep-alive" token is present in the Connection field value. Otherwise the function returns `false`. ][ If `(v == 11)`, the function returns `false` if the "close" token is present in the Connection field value. Otherwise the function returns `true`. ]]
Adjusts the [@https://tools.ietf.org/html/rfc7230#section-3.3.1 [*Transfer-Encoding]] field value as follows: [itemized_list [ If `b` is `true`, the "chunked" token is appended to the list of encodings if it does not already appear last in the list. If the Transfer-Encoding field is absent, the field will be inserted to the container with the value "chunked". ][ If `b` is `false, the "chunked" token is removed from the list of encodings if it appears last in the list. If the result of the removal leaves the list of encodings empty, the Transfer-Encoding field shall not appear when the associated __FieldsWriter__ serializes the fields. ]] If the result of adjusting the field value produces an empty string, the field is removed from the container.
Adjusts the [@https://tools.ietf.org/html/rfc7230#section-3.3.2 [*Content-Length]] field value as follows: [itemized_list [ If `n` contains a value, the Content-Length field will be set to the text representation of the value. Any previous Content-Length fields are removed from the container. ][ If `n` does not contain a value, any present Content-Length fields are removed from the container. ]]
Adjusts the [@https://tools.ietf.org/html/rfc7230#section-6.1 [*Connection]] field value depending on the values of `v` and `b`. The field value is treated as [@https://tools.ietf.org/html/rfc7230#section-6.1 ['connection-option]] (rfc7230). [itemized_list [ If `(v < 11 && b)`, then all "close" tokens present in the value are removed, and the "keep-alive" token is added to the value if it is not already present. ][ If `(v < 11 && ! b)`, then all "close" and "keep-alive" tokens present in the value are removed. ][ If `(v == 11 && b)`, then all "keep-alive" and "close" tokens present in the value are removed. ][ If `(v == 11 && ! b)`, then all "keep-alive" tokens present in the value are removed, and the "close" token is added to the value if it is not already present. ]] If the result of adjusting the field value produces an empty string, the field is removed from the container.