From 24a777945ae57940f8480b4940599187bba2edcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sat, 12 Aug 2017 16:06:59 +0200 Subject: Remove SPDY; document HTTP/2 I just replaced "SPDY" with "HTTP/2" in the documentation. I suspect that's all that's needed, but if there's something off we can fix it later. --- doc/src/guide/connect.asciidoc | 8 ++--- doc/src/guide/http.asciidoc | 8 ++--- doc/src/guide/introduction.asciidoc | 4 +-- doc/src/guide/protocols.asciidoc | 60 ++++++++++++++++++------------------- 4 files changed, 40 insertions(+), 40 deletions(-) (limited to 'doc/src/guide') diff --git a/doc/src/guide/connect.asciidoc b/doc/src/guide/connect.asciidoc index c2e887c..e0b09d6 100644 --- a/doc/src/guide/connect.asciidoc +++ b/doc/src/guide/connect.asciidoc @@ -5,10 +5,10 @@ a connection using the Gun client. === Gun connections -Gun is designed with the SPDY and Websocket protocols in mind. +Gun is designed with the HTTP/2 and Websocket protocols in mind. They are built for long-running connections that allow concurrent exchange of data, either in the form of request/responses for -SPDY or in the form of messages for Websocket. +HTTP/2 or in the form of messages for Websocket. A Gun connection is an Erlang process that manages a socket to a remote endpoint. This Gun connection is owned by a user @@ -35,8 +35,8 @@ The `gun:open/{2,3}` function must be used to open a connection. If the port given is 443, Gun will attempt to connect using SSL. The protocol will be selected automatically using the -NPN extension for TLS. By default Gun supports SPDY/3.1, -SPDY/3 and HTTP/1.1 when connecting using SSL. +ALPN extension for TLS. By default Gun supports HTTP/2 +and HTTP/1.1 when connecting using SSL. For any other port, Gun will attempt to connect using TCP and will use the HTTP/1.1 protocol. diff --git a/doc/src/guide/http.asciidoc b/doc/src/guide/http.asciidoc index e856fb1..ff4aa0a 100644 --- a/doc/src/guide/http.asciidoc +++ b/doc/src/guide/http.asciidoc @@ -1,7 +1,7 @@ == HTTP This chapter describes how to use the Gun client for -communicating with an HTTP/1.1 or SPDY server. +communicating with an HTTP/1.1 or HTTP/2 server. === Streams @@ -130,7 +130,7 @@ the request has no body. It is recommended to send the content-length header if you know it in advance, although this is not required. If it is not set, HTTP/1.1 will use the chunked transfer-encoding, -and SPDY will continue normally as it is chunked by design. +and HTTP/2 will continue normally as it is chunked by design. .POST "/organizations/ninenines" with delayed body @@ -234,7 +234,7 @@ data messages following. If it contains `fin` there will be no data messages. If it contains `nofin` then one or more data messages will follow. -When using SPDY this value is sent with the frame and simply +When using HTTP/2 this value is sent with the frame and simply passed on in the message. When using HTTP/1.1 however Gun must guess whether data will follow by looking at the response headers. @@ -309,7 +309,7 @@ end. === Handling streams pushed by the server -The SPDY protocol allows the server to push more than one +The HTTP/2 protocol allows the server to push more than one resource for every request. It will start sending those extra resources before it starts sending the response itself, so Gun will send you `gun_push` messages before `gun_response` diff --git a/doc/src/guide/introduction.asciidoc b/doc/src/guide/introduction.asciidoc index 2914ef6..89f2ae7 100644 --- a/doc/src/guide/introduction.asciidoc +++ b/doc/src/guide/introduction.asciidoc @@ -1,10 +1,10 @@ == Introduction -Gun is an Erlang HTTP client with support for HTTP/1.1, SPDY and Websocket. +Gun is an Erlang HTTP client with support for HTTP/1.1, HTTP/2 and Websocket. === Prerequisites -Knowledge of Erlang, but also of the HTTP/1.1, SPDY and Websocket +Knowledge of Erlang, but also of the HTTP/1.1, HTTP/2 and Websocket protocols is required in order to read this guide. === Supported platforms diff --git a/doc/src/guide/protocols.asciidoc b/doc/src/guide/protocols.asciidoc index 5e3b273..ae7705f 100644 --- a/doc/src/guide/protocols.asciidoc +++ b/doc/src/guide/protocols.asciidoc @@ -37,29 +37,29 @@ It provides the `gun:ws_upgrade/{2,3,4}` function for that purpose. A `gun_ws_upgrade` message will be sent on success; a `gun_response` message otherwise. -=== SPDY +=== HTTP/2 -SPDY is a binary protocol based on HTTP, compatible with +HTTP/2 is a binary protocol based on HTTP, compatible with the HTTP semantics, that reduces the complexity of parsing requests and responses, compresses the HTTP headers and allows the server to push multiple responses to a single request. -The SPDY interface is very similar to HTTP/1.1, so this +The HTTP/2 interface is very similar to HTTP/1.1, so this section instead focuses on the differences in the interface for the two protocols. -Because a SPDY server can push multiple responses to a +Because a HTTP/2 server can push multiple responses to a single request, Gun might send `gun_push` messages for every push received. They can be ignored safely if they are not needed. -The `gun:cancel/2` function will use the SPDY stream +The `gun:cancel/2` function will use the HTTP/2 stream cancellation mechanism which allows Gun to inform the server to stop sending a response for this particular request, saving resources. -It is not possible to upgrade a SPDY connection to Websocket +It is not possible to upgrade an HTTP/2 connection to Websocket due to protocol limitations. === Websocket @@ -87,33 +87,33 @@ current protocol. .Supported operations per protocol [cols="<,3*^",options="header"] |=== -| Operation | HTTP/1.1 | SPDY | Websocket -| delete | yes | yes | no -| get | yes | yes | no -| head | yes | yes | no -| options | yes | yes | no -| patch | yes | yes | no -| post | yes | yes | no -| put | yes | yes | no -| request | yes | yes | no -| data | yes | yes | no -| await | yes | yes | no -| await_body | yes | yes | no -| flush | yes | yes | no -| cancel | yes | yes | no -| ws_upgrade | yes | no | no -| ws_send | no | no | yes +| Operation | HTTP/1.1 | HTTP/2 | Websocket +| delete | yes | yes | no +| get | yes | yes | no +| head | yes | yes | no +| options | yes | yes | no +| patch | yes | yes | no +| post | yes | yes | no +| put | yes | yes | no +| request | yes | yes | no +| data | yes | yes | no +| await | yes | yes | no +| await_body | yes | yes | no +| flush | yes | yes | no +| cancel | yes | yes | no +| ws_upgrade | yes | no | no +| ws_send | no | no | yes |=== .Messages sent per protocol [cols="<,3*^",options="header"] |=== -| Message | HTTP/1.1 | SPDY | Websocket -| gun_push | no | yes | no -| gun_response | yes | yes | no -| gun_data | yes | yes | no -| gun_error (StreamRef) | yes | yes | no -| gun_error | yes | yes | yes -| gun_ws_upgrade | yes | no | no -| gun_ws | no | no | yes +| Message | HTTP/1.1 | HTTP/2 | Websocket +| gun_push | no | yes | no +| gun_response | yes | yes | no +| gun_data | yes | yes | no +| gun_error (StreamRef) | yes | yes | no +| gun_error | yes | yes | yes +| gun_ws_upgrade | yes | no | no +| gun_ws | no | no | yes |=== -- cgit v1.2.3