fix(lib): Fixed typos in multiple modules

BREAKING CHANGE: The `Preference` header had a typo in a variant and it's string representation,
  change `Preference::HandlingLeniant` to `Preference::HandlingLenient`.
This commit is contained in:
Julian Tescher
2017-02-07 11:04:42 -08:00
committed by Sean McArthur
parent 0d05533d07
commit 2fa414fb5f
15 changed files with 22 additions and 22 deletions

View File

@@ -91,7 +91,7 @@ impl MemBuf {
grow_zerofill(vec, needed);
}
} else {
// we need to allocate more space, but dont have unique
// we need to allocate more space, but don't have unique
// access, so we need to make a new buffer
trace!("MemBuf::reserve shared buffer, creating new");
let mut new = MemBuf::with_capacity(needed);

View File

@@ -524,7 +524,7 @@ impl<K: KeepAlive> State<K> {
}
// The DebugFrame and DebugChunk are simple Debug implementations that allow
// us to dump the frame into logs, wihtout logging the entirety of the bytes.
// us to dump the frame into logs, without logging the entirety of the bytes.
struct DebugFrame<'a, T: fmt::Debug + 'a>(&'a Frame<http::MessageHead<T>, http::Chunk, ::Error>);
impl<'a, T: fmt::Debug + 'a> fmt::Debug for DebugFrame<'a, T> {

View File

@@ -72,7 +72,7 @@ impl HttpMessage for Http11Message {
let is_empty = !should_have_response_body(&method, raw_status.0);
stream.get_mut().set_previous_response_expected_no_content(is_empty);
// According to https://tools.ietf.org/html/rfc7230#section-3.3.3
// 1. HEAD reponses, and Status 1xx, 204, and 304 cannot have a body.
// 1. HEAD responses, and Status 1xx, 204, and 304 cannot have a body.
// 2. Status 2xx to a CONNECT cannot have a body.
// 3. Transfer-Encoding: chunked has a chunked body.
// 4. If multiple differing Content-Length headers or invalid, close connection.
@@ -86,7 +86,7 @@ impl HttpMessage for Http11Message {
if codings.last() == Some(&Chunked) {
ChunkedReader(stream, None)
} else {
trace!("not chuncked. read till eof");
trace!("not chunked. read till eof");
EofReader(stream)
}
} else if let Some(&ContentLength(len)) = headers.get() {

View File

@@ -150,7 +150,7 @@ impl Http1Transaction for ClientTransaction {
fn decoder(inc: &MessageHead<Self::Incoming>) -> ::Result<Decoder> {
use ::header;
// According to https://tools.ietf.org/html/rfc7230#section-3.3.3
// 1. HEAD reponses, and Status 1xx, 204, and 304 cannot have a body.
// 1. HEAD responses, and Status 1xx, 204, and 304 cannot have a body.
// 2. Status 2xx to a CONNECT cannot have a body.
//
// First two steps taken care of before this method.
@@ -164,7 +164,7 @@ impl Http1Transaction for ClientTransaction {
if codings.last() == Some(&header::Encoding::Chunked) {
Ok(Decoder::chunked())
} else {
trace!("not chuncked. read till eof");
trace!("not chunked. read till eof");
Ok(Decoder::eof())
}
} else if let Some(&header::ContentLength(len)) = inc.headers.get() {