Skip to content

Commit

Permalink
Replace HTTP/2.0 by HTTP/2 😅
Browse files Browse the repository at this point in the history
The protocol is named HTTP/2.
  • Loading branch information
nox authored and seanmonstar committed Oct 20, 2021
1 parent c38c94c commit f52d5e6
Show file tree
Hide file tree
Showing 11 changed files with 111 additions and 111 deletions.
96 changes: 48 additions & 48 deletions src/client.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{error, fmt, io};

pub use crate::frame::Reason;

/// Represents HTTP/2.0 operation errors.
/// Represents HTTP/2 operation errors.
///
/// `Error` covers error cases raised by protocol errors caused by the
/// peer, I/O (transport) errors, and errors caused by the user of the library.
Expand Down
2 changes: 1 addition & 1 deletion src/frame/head.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl Head {
}
}

/// Parse an HTTP/2.0 frame header
/// Parse an HTTP/2 frame header
pub fn parse(header: &[u8]) -> Head {
let (stream_id, _) = StreamId::parse(&header[5..]);

Expand Down
2 changes: 1 addition & 1 deletion src/frame/reason.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::fmt;

/// HTTP/2.0 error codes.
/// HTTP/2 error codes.
///
/// Error codes are used in `RST_STREAM` and `GOAWAY` frames to convey the
/// reasons for the stream or connection error. For example,
Expand Down
2 changes: 1 addition & 1 deletion src/hpack/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use http::header::{HeaderName, HeaderValue};
use http::{Method, StatusCode};
use std::fmt;

/// HTTP/2.0 Header
/// HTTP/2 Header
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum Header<T = HeaderName> {
Field { name: T, value: HeaderValue },
Expand Down
18 changes: 9 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! An asynchronous, HTTP/2.0 server and client implementation.
//! An asynchronous, HTTP/2 server and client implementation.
//!
//! This library implements the [HTTP/2.0] specification. The implementation is
//! This library implements the [HTTP/2] specification. The implementation is
//! asynchronous, using [futures] as the basis for the API. The implementation
//! is also decoupled from TCP or TLS details. The user must handle ALPN and
//! HTTP/1.1 upgrades themselves.
Expand All @@ -24,19 +24,19 @@
//! # Handshake
//!
//! Both the client and the server require a connection to already be in a state
//! ready to start the HTTP/2.0 handshake. This library does not provide
//! ready to start the HTTP/2 handshake. This library does not provide
//! facilities to do this.
//!
//! There are three ways to reach an appropriate state to start the HTTP/2.0
//! There are three ways to reach an appropriate state to start the HTTP/2
//! handshake.
//!
//! * Opening an HTTP/1.1 connection and performing an [upgrade].
//! * Opening a connection with TLS and use ALPN to negotiate the protocol.
//! * Open a connection with prior knowledge, i.e. both the client and the
//! server assume that the connection is immediately ready to start the
//! HTTP/2.0 handshake once opened.
//! HTTP/2 handshake once opened.
//!
//! Once the connection is ready to start the HTTP/2.0 handshake, it can be
//! Once the connection is ready to start the HTTP/2 handshake, it can be
//! passed to [`server::handshake`] or [`client::handshake`]. At this point, the
//! library will start the handshake process, which consists of:
//!
Expand All @@ -48,10 +48,10 @@
//!
//! # Flow control
//!
//! [Flow control] is a fundamental feature of HTTP/2.0. The `h2` library
//! [Flow control] is a fundamental feature of HTTP/2. The `h2` library
//! exposes flow control to the user.
//!
//! An HTTP/2.0 client or server may not send unlimited data to the peer. When a
//! An HTTP/2 client or server may not send unlimited data to the peer. When a
//! stream is initiated, both the client and the server are provided with an
//! initial window size for that stream. A window size is the number of bytes
//! the endpoint can send to the peer. At any point in time, the peer may
Expand All @@ -66,7 +66,7 @@
//! Managing flow control for outbound data is done through [`SendStream`]. See
//! the struct level documentation for those two types for more details.
//!
//! [HTTP/2.0]: https://http2.github.io/
//! [HTTP/2]: https://http2.github.io/
//! [futures]: https://docs.rs/futures/
//! [`client`]: client/index.html
//! [`server`]: server/index.html
Expand Down
2 changes: 1 addition & 1 deletion src/proto/streams/streams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ where
P: Peer,
{
/// Holds most of the connection and stream related state for processing
/// HTTP/2.0 frames associated with streams.
/// HTTP/2 frames associated with streams.
inner: Arc<Mutex<Inner>>,

/// This is the queue of frames to be written to the wire. This is split out
Expand Down
Loading

0 comments on commit f52d5e6

Please sign in to comment.