Function http_serve::serve [−][src]
pub fn serve<E: Entity, P: Payload + From<Box<Stream<Item = E::Data, Error = E::Error> + Send>>, PI>(
e: E,
req: &Request<PI>
) -> Response<P>
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.