From 7bdd710849a35c12afe3f91bc5df4006db4c0282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sun, 6 Mar 2016 17:48:35 +0100 Subject: Completely remove SPDY --- doc/src/guide/broken_clients.asciidoc | 2 +- doc/src/guide/erlang_web.asciidoc | 2 +- doc/src/guide/introduction.asciidoc | 2 +- doc/src/guide/modern_web.asciidoc | 28 ++++++----------------- doc/src/guide/overview.asciidoc | 8 +++---- doc/src/manual/cowboy.asciidoc | 10 --------- doc/src/manual/cowboy_spdy.asciidoc | 42 ----------------------------------- 7 files changed, 14 insertions(+), 80 deletions(-) delete mode 100644 doc/src/manual/cowboy_spdy.asciidoc (limited to 'doc/src') diff --git a/doc/src/guide/broken_clients.asciidoc b/doc/src/guide/broken_clients.asciidoc index e91e9a2..17bb892 100644 --- a/doc/src/guide/broken_clients.asciidoc +++ b/doc/src/guide/broken_clients.asciidoc @@ -33,7 +33,7 @@ capitalize_hook(Status, Headers, Body, Req) -> cowboy_req:reply(Status, Headers2, Body, Req). ---- -Note that SPDY clients do not have that particular issue +Note that HTTP/2 clients do not have that particular issue because the specification explicitly says all headers are lowercase, unlike HTTP which allows any case but treats them as case insensitive. diff --git a/doc/src/guide/erlang_web.asciidoc b/doc/src/guide/erlang_web.asciidoc index 91a9eca..702e043 100644 --- a/doc/src/guide/erlang_web.asciidoc +++ b/doc/src/guide/erlang_web.asciidoc @@ -106,7 +106,7 @@ new messages, and perform the operations required by only activating the required parts of the system. The more recent Web technologies, like Websocket of course, but also -SPDY and HTTP/2.0, are all fully asynchronous protocols. The concept +HTTP/2.0, are all fully asynchronous protocols. The concept of requests and responses is retained of course, but anything could be sent in between, by both the client or the browser, and the responses could also be received in a completely different order. diff --git a/doc/src/guide/introduction.asciidoc b/doc/src/guide/introduction.asciidoc index 0ffeb91..9cdcbc9 100644 --- a/doc/src/guide/introduction.asciidoc +++ b/doc/src/guide/introduction.asciidoc @@ -4,7 +4,7 @@ Cowboy is a small, fast and modular HTTP server written in Erlang. Cowboy aims to provide a complete HTTP stack, including its derivatives -SPDY, Websocket and REST. Cowboy currently supports HTTP/1.0, HTTP/1.1, +Websocket and REST. Cowboy currently supports HTTP/1.0, HTTP/1.1, HTTP/2, Websocket (all implemented drafts + standard) and Webmachine-based REST. Cowboy is a high quality project. It has a small code base, is very diff --git a/doc/src/guide/modern_web.asciidoc b/doc/src/guide/modern_web.asciidoc index 7dc812b..732972f 100644 --- a/doc/src/guide/modern_web.asciidoc +++ b/doc/src/guide/modern_web.asciidoc @@ -180,35 +180,21 @@ A Websocket connection can be used to transfer any kind of data, small or big, text or binary. Because of this Websocket is sometimes used for communication between systems. -=== SPDY +=== HTTP/2 -SPDY is an attempt to reduce page loading time by opening a +HTTP/2 is an attempt to reduce page loading time by opening a single connection per server, keeping it open for subsequent requests, and also by compressing the HTTP headers to reduce the size of requests. -SPDY is compatible with HTTP/1.1 semantics, and is actually +HTTP/2 is compatible with HTTP/1.1 semantics, and is actually just a different way of performing HTTP requests and responses, by using binary frames instead of a text-based protocol. -SPDY also allows the server to send extra responses following +HTTP/2 also allows the server to send extra responses following a request. This is meant to allow sending the resources associated with the request before the client requests them, saving latency when loading websites. -SPDY is an experiment that has proven successful and is used -as the basis for the HTTP/2.0 standard. - -Browsers make use of TLS Next Protocol Negotiation to upgrade -to a SPDY connection seamlessly if the protocol supports it. - -The protocol itself has a few shortcomings which are being -fixed in HTTP/2.0. - -=== HTTP/2.0 - -HTTP/2.0 is the long-awaited update to the HTTP/1.1 protocol. -It is based on SPDY although a lot has been improved at the -time of writing. - -HTTP/2.0 is an asynchronous two-ways communication channel -between two endpoints. +Browsers make use of TLS Application-Layer Protocol Negotiation +extension to upgrade to an HTTP/2 connection seamlessly if the +server supports it. diff --git a/doc/src/guide/overview.asciidoc b/doc/src/guide/overview.asciidoc index b337e3d..3e5cbb7 100644 --- a/doc/src/guide/overview.asciidoc +++ b/doc/src/guide/overview.asciidoc @@ -55,7 +55,7 @@ HTTP/1.1 allows the client to request that the server keeps the connection alive. This mechanism is described in the next section. -SPDY is designed to allow sending multiple requests +HTTP/2 is designed to allow sending multiple requests asynchronously on the same connection. Details on what this means for your application is described in this chapter. @@ -126,9 +126,9 @@ static files for example. This is handled automatically by the server. -=== Asynchronous requests (SPDY) +=== Asynchronous requests (HTTP/2) -In SPDY, the client can send a request at any time. +In HTTP/2, the client can send a request at any time. And the server can send a response at any time too. This means for example that the client does not need @@ -142,7 +142,7 @@ Cowboy creates a new process for each request, and these processes are managed by another process that handles the connection itself. -SPDY servers may also decide to send resources to the +HTTP/2 servers may also decide to send resources to the client before the client requests them. This is especially useful for sending static files associated with the HTML page requested, as this reduces the latency of the overall diff --git a/doc/src/manual/cowboy.asciidoc b/doc/src/manual/cowboy.asciidoc index cd83b3d..10e3696 100644 --- a/doc/src/manual/cowboy.asciidoc +++ b/doc/src/manual/cowboy.asciidoc @@ -67,16 +67,6 @@ ProtoOpts = cowboy_protocol:opts():: HTTP protocol options. Start listening for HTTPS connections. Returns the pid for this listener's supervisor. -=== start_spdy(Ref, NbAcceptors, TransOpts, ProtoOpts) -> {ok, pid()} - -Ref = ranch:ref():: Listener name. -NbAcceptors = non_neg_integer():: Number of acceptor processes. -TransOpts = ranch_ssl:opts():: SSL transport options. -ProtoOpts = cowboy_spdy:opts():: SPDY protocol options. - -Start listening for SPDY connections. Returns the pid for this -listener's supervisor. - === stop_listener(Ref) -> ok | {error, not_found} Ref = ranch:ref():: Listener name. diff --git a/doc/src/manual/cowboy_spdy.asciidoc b/doc/src/manual/cowboy_spdy.asciidoc deleted file mode 100644 index b0dcb70..0000000 --- a/doc/src/manual/cowboy_spdy.asciidoc +++ /dev/null @@ -1,42 +0,0 @@ -= cowboy_spdy(3) - -== Name - -cowboy_spdy - SPDY protocol - -== Description - -The `cowboy_spdy` module implements SPDY/3 as a Ranch protocol. - -== Types - -=== opts() = [Option] - -[source,erlang] ----- -Option = {env, cowboy_middleware:env()} - | {middlewares, [module()]} - | {onresponse, cowboy:onresponse_fun()} ----- - -Configuration for the SPDY protocol handler. - -This configuration is passed to Cowboy when starting listeners -using the `cowboy:start_spdy/4` function. - -It can be updated without restarting listeners using the -Ranch functions `ranch:get_protocol_options/1` and -`ranch:set_protocol_options/2`. - -== Option descriptions - -The default value is given next to the option name. - -env ([{listener, Ref}]):: - Initial middleware environment. - -middlewares ([cowboy_router, cowboy_handler]):: - List of middlewares to execute for every requests. - -onresponse (undefined):: - Fun called every time a response is sent. -- cgit v1.2.3