package http
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=6b420c56203b3a0b515964f036bcea0fb9a362876b5791cd7ff50e12366c489c
sha512=839ff6156658ca6d7922e6eed63ebb84dd09c76107790477be55a1ffc4a3800bf49c435147a0ed628f147eaeccff9a8d34565e3787f32c15e187b6e8855f0b93
doc/http/Http/Response/index.html
Module Http.ResponseSource
requires_content_length ~request_meth t is true if a combination of t and request_meth indicates that a response message must include "Content-Length" header. However, please note exceptions to this:
- Response with status code of
304may or may not include the header. - Response to request with method
HEADmay or may not include the header.
https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2
content_length t is Some x if the "Content-Length" header in t exists and its value x is a non negative integer, x>=0
It is None if requires_content_length t = false or the value encoded in "Content-Length" is not a valid integer value, i.e >= 0.
See https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2
make () is a value of t. The default values for the request, if not specified, are: status is `Ok, version is `HTTP_1_1. The request encoding value is determined via the Header.get_transfer_encoding function.