docs(changelog,header,proto,client): Fix small typos

This commit is contained in:
Julian Tescher
2017-10-21 20:00:58 -07:00
parent 988b870a09
commit 5700ad79a3
4 changed files with 9 additions and 9 deletions

View File

@@ -870,7 +870,7 @@ fn verify_and_trim(s: &str, b: (u8, u8)) -> ::Result<&str> {
let byte_array = s.as_bytes();
// Verify that `s` starts with `b.0` and ends with `b.1` and return
// the contained substring after triming whitespace.
// the contained substring after trimming whitespace.
if length > 1 && b.0 == byte_array[0] && b.1 == byte_array[length - 1] {
Ok(s.trim_matches(
|c: char| c == b.0 as char || c == b.1 as char || c.is_whitespace())

View File

@@ -90,7 +90,7 @@ impl Http1Transaction for ServerTransaction {
// https://tools.ietf.org/html/rfc7230#section-3.3.3
// If Transfer-Encoding header is present, and 'chunked' is
// not the final encoding, and this is a Request, then it is
// mal-formed. A server should responsed with 400 Bad Request.
// mal-formed. A server should respond with 400 Bad Request.
if encodings.last() == Some(&header::Encoding::Chunked) {
Ok(Decoder::chunked())
} else {
@@ -137,7 +137,7 @@ impl Http1Transaction for ServerTransaction {
impl ServerTransaction {
fn set_length(head: &mut MessageHead<StatusCode>, has_body: bool, method: Option<&Method>) -> Encoder {
// these are here thanks to borrowck
// `if method == Some(&Method::Get)` says the RHS doesnt live long enough
// `if method == Some(&Method::Get)` says the RHS doesn't live long enough
const HEAD: Option<&'static Method> = Some(&Method::Head);
const CONNECT: Option<&'static Method> = Some(&Method::Connect);