[−][src]Function http_serve::serve
pub fn serve<E: Entity, B: Body + From<Box<dyn Stream<Item = Result<E::Data, E::Error>> + Send + Sync>>, BI>(
e: E,
req: &Request<BI>
) -> Response<B>
Serves GET and HEAD requests for a given byte-ranged entity.
Handles conditional & subrange requests.
The caller is expected to have already determined the correct entity and appended
Expires, Cache-Control, and Vary headers if desired.