summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy.set_env/index.html2
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy/index.html6
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.header/index.html258
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.headers/index.html228
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.host/index.html229
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.method/index.html238
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.path/index.html228
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.peer/index.html234
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.port/index.html228
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.qs/index.html227
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.scheme/index.html227
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.uri/index.html315
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.version/index.html226
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req/index.html1374
-rw-r--r--docs/en/cowboy/2.0/manual/index.html55
-rw-r--r--docs/en/erlang.mk/1/guide/app.asciidoc7
-rw-r--r--docs/en/erlang.mk/1/guide/app/index.html19
-rw-r--r--docs/en/erlang.mk/1/guide/deps.asciidoc49
-rw-r--r--docs/en/erlang.mk/1/guide/deps/index.html54
-rw-r--r--docs/en/erlang.mk/1/guide/escripts.asciidoc81
-rw-r--r--docs/en/erlang.mk/1/guide/escripts/index.html90
-rw-r--r--docs/en/erlang.mk/1/guide/external_plugins_list.asciidoc9
-rw-r--r--docs/en/erlang.mk/1/guide/external_plugins_list/index.html11
-rw-r--r--docs/en/erlang.mk/1/guide/getting_started.asciidoc4
-rw-r--r--docs/en/erlang.mk/1/guide/getting_started/index.html4
-rw-r--r--docs/en/erlang.mk/1/guide/index.html5
-rw-r--r--docs/en/erlang.mk/1/guide/installation.asciidoc51
-rw-r--r--docs/en/erlang.mk/1/guide/installation/index.html58
-rw-r--r--docs/en/erlang.mk/1/guide/releases.asciidoc54
-rw-r--r--docs/en/erlang.mk/1/guide/releases/index.html59
-rw-r--r--docs/en/erlang.mk/1/guide/sfx.asciidoc49
-rw-r--r--docs/en/erlang.mk/1/guide/sfx/index.html206
-rw-r--r--docs/en/ranch/1.2/manual/ranch_ssl/index.html27
-rw-r--r--docs/index.xml68
-rw-r--r--donate/index.html24
-rw-r--r--index.html24
-rw-r--r--services/index.html24
-rw-r--r--sitemap.xml80
38 files changed, 3931 insertions, 1201 deletions
diff --git a/docs/en/cowboy/2.0/manual/cowboy.set_env/index.html b/docs/en/cowboy/2.0/manual/cowboy.set_env/index.html
index bce57e3c..ea6c5a1c 100644
--- a/docs/en/cowboy/2.0/manual/cowboy.set_env/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy.set_env/index.html
@@ -127,9 +127,9 @@ Value
<p>
The new value.
</p>
+<div class="paragraph"><p>The type of the value differs depending on the key.</p></div>
</dd>
</dl></div>
-<div class="paragraph"><p>The type of the value differs depending on the key.</p></div>
</div>
</div>
<div class="sect1">
diff --git a/docs/en/cowboy/2.0/manual/cowboy/index.html b/docs/en/cowboy/2.0/manual/cowboy/index.html
index a6aba962..2d8b5978 100644
--- a/docs/en/cowboy/2.0/manual/cowboy/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy/index.html
@@ -123,10 +123,10 @@ http://www.gnu.org/software/src-highlite -->
| {<span style="color: #009900">Name</span>, <span style="color: #009900">Constraints</span>}
| {<span style="color: #009900">Name</span>, <span style="color: #009900">Constraints</span>, <span style="color: #009900">Default</span>}]
-<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
+<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">atom</span></span>()
<span style="color: #009900">Constraints</span> <span style="color: #990000">::</span> <span style="color: #009900">Constraint</span> | [<span style="color: #009900">Constraint</span>]
-<span style="color: #009900">Constraint</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>()
-<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()</tt></pre></div></div>
+<span style="color: #009900">Constraint</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_constraints:constraint</span></span>()
+<span style="color: #009900">Default</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">any</span></span>()</tt></pre></div></div>
<div class="paragraph"><p>Fields description for match operations.</p></div>
<div class="paragraph"><p>This type is used in <a href="../cowboy_router">cowboy_router(3)</a>
for matching bindings and in the match functions found in
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.header/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.header/index.html
new file mode 100644
index 00000000..cc2aa12e
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.header/index.html
@@ -0,0 +1,258 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.16" />
+
+ <title>Nine Nines: cowboy_req:header(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_req:header(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_req:header - HTTP header</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">header</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Req</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">header</span></span>(<span style="color: #009900">Name</span>, <span style="color: #009900">Req</span>, <span style="color: #000080">undefined</span>)
+<span style="font-weight: bold"><span style="color: #000000">header</span></span>(<span style="color: #009900">Name</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="color: #009900">Req</span>, <span style="color: #009900">Default</span>) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() | <span style="color: #009900">Default</span>
+
+<span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Return the value for the given HTTP header.</p></div>
+<div class="paragraph"><p>The header name must be given as a lowercase binary string.
+While header names are case insensitive, Cowboy requires them
+to be given as lowercase to function properly.</p></div>
+<div class="paragraph"><p>Headers can also be obtained using pattern matching:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">headers</span> <span style="color: #990000">:=</span> #{<span style="color: #009900">Name</span> <span style="color: #990000">:=</span> <span style="color: #009900">Value</span>}} <span style="color: #990000">=</span> <span style="color: #009900">Req</span><span style="color: #990000">.</span></tt></pre></div></div>
+<div class="paragraph"><p>Note that this snippet will crash if the header is missing.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Name
+</dt>
+<dd>
+<p>
+Desired HTTP header name as a binary string.
+</p>
+</dd>
+<dt class="hdlist1">
+Req
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+<dt class="hdlist1">
+Default
+</dt>
+<dd>
+<p>
+Default value returned when the header is missing.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The header value is returned as a binary string. When the
+header is missing, the default argument is returned.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>2.0</strong>: Only the header value is returned, it is no longer wrapped in a tuple.
+</p>
+</li>
+<li>
+<p>
+<strong>1.0</strong>: Function introduced.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Get the accept header</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Accept</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"accept"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">Get the content-length header with a default value</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Length</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:header</span></span>(<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"content-length"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #009900">Req</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"0"</span><span style="color: #990000">&gt;&gt;</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy_req">cowboy_req(3)</a>,
+<a href="../cowboy_req.headers">cowboy_req:headers(3)</a>,
+<a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a></p></div>
+</div>
+</div>
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.headers/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.headers/index.html
new file mode 100644
index 00000000..f601d1ef
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.headers/index.html
@@ -0,0 +1,228 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.16" />
+
+ <title>Nine Nines: cowboy_req:headers(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_req:headers(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_req:headers - HTTP headers</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">headers</span></span>(<span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Return all request headers.</p></div>
+<div class="paragraph"><p>Request headers can also be obtained using pattern matching:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">headers</span> <span style="color: #990000">:=</span> <span style="color: #009900">Headers</span>} <span style="color: #990000">=</span> <span style="color: #009900">Req</span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Req
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Headers are returned as a map with keys being lowercase
+binary strings, and values as binary strings.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>2.0</strong>: Only the headers are returned, they are no longer wrapped in a tuple.
+</p>
+</li>
+<li>
+<p>
+<strong>1.0</strong>: Function introduced.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Get all headers</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Headers</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:headers</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy_req">cowboy_req(3)</a>,
+<a href="../cowboy_req.header">cowboy_req:header(3)</a>,
+<a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a></p></div>
+</div>
+</div>
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.host/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.host/index.html
new file mode 100644
index 00000000..8a0f4bd8
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.host/index.html
@@ -0,0 +1,229 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.16" />
+
+ <title>Nine Nines: cowboy_req:host(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_req:host(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_req:host - URI host name</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">host</span></span>(<span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Host</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Return the host name of the effective request URI.</p></div>
+<div class="paragraph"><p>The host name can also be obtained using pattern matching:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">host</span> <span style="color: #990000">:=</span> <span style="color: #009900">Host</span>} <span style="color: #990000">=</span> <span style="color: #009900">Req</span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Req
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The host name is returned as a lowercase binary string.
+It is case insensitive.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>2.0</strong>: Only the host name is returned, it is no longer wrapped in a tuple.
+</p>
+</li>
+<li>
+<p>
+<strong>1.0</strong>: Function introduced.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Get the effective request URI&#8217;s host name</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Host</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:host</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy_req">cowboy_req(3)</a>,
+<a href="../cowboy_req.binding">cowboy_req:binding(3)</a>,
+<a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a>,
+<a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a></p></div>
+</div>
+</div>
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.method/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.method/index.html
new file mode 100644
index 00000000..0d9b2b5f
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.method/index.html
@@ -0,0 +1,238 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.16" />
+
+ <title>Nine Nines: cowboy_req:method(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_req:method(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_req:method - HTTP method</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">method</span></span>(<span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Method</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Return the request&#8217;s HTTP method.</p></div>
+<div class="paragraph"><p>The method can also be obtained using pattern matching:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">method</span> <span style="color: #990000">:=</span> <span style="color: #009900">Method</span>} <span style="color: #990000">=</span> <span style="color: #009900">Req</span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Req
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The request&#8217;s HTTP method is returned as a binary string.
+While methods are case sensitive, standard methods are
+always uppercase.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>2.0</strong>: Only the method is returned, it is no longer wrapped in a tuple.
+</p>
+</li>
+<li>
+<p>
+<strong>1.0</strong>: Function introduced.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Ensure the request&#8217;s method is GET</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"GET"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:method</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">Allow methods from list</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ <span style="font-weight: bold"><span style="color: #0000FF">case</span></span> <span style="font-weight: bold"><span style="color: #000000">lists:member</span></span>(<span style="font-weight: bold"><span style="color: #000000">cowboy_req:method</span></span>(<span style="color: #009900">Req</span>), [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"GET"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"POST"</span><span style="color: #990000">&gt;&gt;</span>]) <span style="font-weight: bold"><span style="color: #0000FF">of</span></span>
+ <span style="color: #000080">true</span> <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">handle</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>);
+ <span style="color: #000080">false</span> <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">method_not_allowed</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>)
+ <span style="font-weight: bold"><span style="color: #0000FF">end</span></span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy_req">cowboy_req(3)</a></p></div>
+</div>
+</div>
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.path/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.path/index.html
new file mode 100644
index 00000000..bedb39cc
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.path/index.html
@@ -0,0 +1,228 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.16" />
+
+ <title>Nine Nines: cowboy_req:path(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_req:path(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_req:path - URI path</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">path</span></span>(<span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Path</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Return the path of the effective request URI.</p></div>
+<div class="paragraph"><p>The path can also be obtained using pattern matching:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">path</span> <span style="color: #990000">:=</span> <span style="color: #009900">Path</span>} <span style="color: #990000">=</span> <span style="color: #009900">Req</span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Req
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The path is returned as a binary string. It is case sensitive.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>2.0</strong>: Only the path is returned, it is no longer wrapped in a tuple.
+</p>
+</li>
+<li>
+<p>
+<strong>1.0</strong>: Function introduced.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Get the effective request URI&#8217;s path</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Path</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:path</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy_req">cowboy_req(3)</a>,
+<a href="../cowboy_req.binding">cowboy_req:binding(3)</a>,
+<a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a>,
+<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a></p></div>
+</div>
+</div>
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.peer/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.peer/index.html
new file mode 100644
index 00000000..79ace331
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.peer/index.html
@@ -0,0 +1,234 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.16" />
+
+ <title>Nine Nines: cowboy_req:peer(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_req:peer(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_req:peer - Peer address and port</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">peer</span></span>(<span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Peer</span>
+
+<span style="color: #009900">Peer</span> <span style="color: #990000">::</span> {<span style="font-weight: bold"><span style="color: #000000">inet:ip_address</span></span>(), <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>()}</tt></pre></div></div>
+<div class="paragraph"><p>Return the peer&#8217;s IP address and port number.</p></div>
+<div class="paragraph"><p>The peer can also be obtained using pattern matching:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">peer</span> <span style="color: #990000">:=</span> {<span style="color: #009900">IP</span>, <span style="color: #009900">Port</span>}} <span style="color: #990000">=</span> <span style="color: #009900">Req</span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Req
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The peer&#8217;s IP address and port number.</p></div>
+<div class="paragraph"><p>The peer is not necessarily the client&#8217;s IP address and port.
+It is the IP address of the endpoint connecting directly to
+the server, which may be a gateway or a proxy.</p></div>
+<div class="paragraph"><p>The forwarded header can be used to get better information
+about the different endpoints from the client to the server.
+Note however that it is only informative; there is no reliable
+way of determining the source of an HTTP request.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>2.0</strong>: Only the peer is returned, it is no longer wrapped in a tuple.
+</p>
+</li>
+<li>
+<p>
+<strong>1.0</strong>: Function introduced.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Get the peer IP address and port number.</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>{<span style="color: #009900">IP</span>, <span style="color: #009900">Port</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:peer</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy_req">cowboy_req(3)</a></p></div>
+</div>
+</div>
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.port/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.port/index.html
new file mode 100644
index 00000000..0457d82b
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.port/index.html
@@ -0,0 +1,228 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.16" />
+
+ <title>Nine Nines: cowboy_req:port(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_req:port(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_req:port - URI port number</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">port</span></span>(<span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Port</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Return the port number of the effective request URI.</p></div>
+<div class="paragraph"><p>Note that the port number returned by this function is obtained
+by parsing the host header. It may be different from the port
+the peer used to connect to Cowboy.</p></div>
+<div class="paragraph"><p>The port number can also be obtained using pattern matching:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">port</span> <span style="color: #990000">:=</span> <span style="color: #009900">Port</span>} <span style="color: #990000">=</span> <span style="color: #009900">Req</span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Req
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The port number is returned as an integer.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>2.0</strong>: Only the port number is returned, it is no longer wrapped in a tuple.
+</p>
+</li>
+<li>
+<p>
+<strong>1.0</strong>: Function introduced.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Get the effective request URI&#8217;s port number</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Port</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:port</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy_req">cowboy_req(3)</a></p></div>
+</div>
+</div>
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.qs/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.qs/index.html
new file mode 100644
index 00000000..5ac89c60
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.qs/index.html
@@ -0,0 +1,227 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.16" />
+
+ <title>Nine Nines: cowboy_req:qs(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_req:qs(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_req:qs - URI query string</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">qs</span></span>(<span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Qs</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Return the query string of the effective request URI.</p></div>
+<div class="paragraph"><p>The query string can also be obtained using pattern matching:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">qs</span> <span style="color: #990000">:=</span> <span style="color: #009900">Qs</span>} <span style="color: #990000">=</span> <span style="color: #009900">Req</span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Req
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The query string is returned as a binary string. It is case sensitive.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>2.0</strong>: Only the query string is returned, it is no longer wrapped in a tuple.
+</p>
+</li>
+<li>
+<p>
+<strong>1.0</strong>: Function introduced.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Get the effective request URI&#8217;s query string</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Qs</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:qs</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy_req">cowboy_req(3)</a>,
+<a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a>,
+<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a></p></div>
+</div>
+</div>
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.scheme/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.scheme/index.html
new file mode 100644
index 00000000..3f38c9c1
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.scheme/index.html
@@ -0,0 +1,227 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.16" />
+
+ <title>Nine Nines: cowboy_req:scheme(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_req:scheme(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_req:scheme - URI scheme</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">scheme</span></span>(<span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Scheme</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Return the scheme of the effective request URI.</p></div>
+<div class="paragraph"><p>The scheme can also be obtained using pattern matching:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">scheme</span> <span style="color: #990000">:=</span> <span style="color: #009900">Scheme</span>} <span style="color: #990000">=</span> <span style="color: #009900">Req</span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Req
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The scheme is returned as a binary. It is case insensitive.</p></div>
+<div class="paragraph"><p>Cowboy will only set the scheme to <code>&lt;&lt;"http"&gt;&gt;</code> or <code>&lt;&lt;"https"&gt;&gt;</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>2.0</strong>: Function introduced.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Redirect HTTP to HTTPS</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req0</span><span style="color: #990000">=</span>#{<span style="color: #FF6600">scheme</span> <span style="color: #990000">:=</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"http"</span><span style="color: #990000">&gt;&gt;</span>}, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ <span style="color: #009900">Req</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:reply</span></span>(<span style="color: #993399">302</span>, #{
+ <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"location"</span><span style="color: #990000">&gt;&gt;</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:uri</span></span>(<span style="color: #009900">Req</span>, #{<span style="color: #0000FF">scheme</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"https"</span><span style="color: #990000">&gt;&gt;</span>})
+ }, <span style="color: #009900">Req0</span>),
+ {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>};
+<span style="font-weight: bold"><span style="color: #000000">init</span></span>(<span style="color: #009900">Req</span>, <span style="color: #009900">State</span>) <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">cowboy_rest</span>, <span style="color: #009900">Req</span>, <span style="color: #009900">State</span>}<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy_req">cowboy_req(3)</a></p></div>
+</div>
+</div>
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.uri/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.uri/index.html
new file mode 100644
index 00000000..ae15f9b1
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.uri/index.html
@@ -0,0 +1,315 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.16" />
+
+ <title>Nine Nines: cowboy_req:uri(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_req:uri(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_req:uri - Reconstructed URI</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">uri</span></span>(<span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()) <span style="color: #990000">-&gt;</span> <span style="font-weight: bold"><span style="color: #000000">uri</span></span>(<span style="color: #009900">Req</span>, #{})
+<span style="font-weight: bold"><span style="color: #000000">uri</span></span>(<span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>(), <span style="color: #009900">Opts</span>) <span style="color: #990000">-&gt;</span> <span style="color: #009900">URI</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
+
+<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> #{
+ <span style="color: #0000FF">scheme</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() | <span style="color: #000080">undefined</span>,
+ <span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() | <span style="color: #000080">undefined</span>,
+ <span style="color: #0000FF">port</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>() | <span style="color: #000080">undefined</span>,
+ <span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() | <span style="color: #000080">undefined</span>,
+ <span style="color: #0000FF">qs</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() | <span style="color: #000080">undefined</span>,
+ <span style="color: #0000FF">fragment</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>() | <span style="color: #000080">undefined</span>
+}</tt></pre></div></div>
+<div class="paragraph"><p>Reconstruct the effective request URI, optionally modifying components.</p></div>
+<div class="paragraph"><p>By default Cowboy will build a URI using the components found
+in the request. Options allow disabling or replacing individual
+components.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Req
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+<dt class="hdlist1">
+Opts
+</dt>
+<dd>
+<p>
+Map for overriding individual components.
+</p>
+<div class="paragraph"><p>To replace a component, provide its new value as a binary
+string or an iolist. To disable a component, set its value
+to <code>undefined</code>.</p></div>
+<div class="paragraph"><p>As this function always returns a valid URI, there are some
+things to note:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Disabling the host also disables the scheme and port.
+</p>
+</li>
+<li>
+<p>
+There is no fragment component by default as these are
+ not sent with the request.
+</p>
+</li>
+<li>
+<p>
+The port number may not appear in the resulting URI if
+ it is the default port for the given scheme (http: 80; https: 443).
+</p>
+</li>
+</ul></div>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The reconstructed URI is returned as an iolist or a binary string.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>2.0</strong>: Individual components can be replaced or disabled.
+</p>
+</li>
+<li>
+<p>
+<strong>2.0</strong>: Only the URI is returned, it is no longer wrapped in a tuple.
+</p>
+</li>
+<li>
+<p>
+<strong>2.0</strong>: Function introduced. Replaces <code>host_url/1</code> and <code>url/1</code>.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>With an effective request URI <a href="http://example.org/path/to/res?edit=1">http://example.org/path/to/res?edit=1</a>
+we can have:</p></div>
+<div class="listingblock">
+<div class="title">Protocol relative form</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-style: italic"><span style="color: #9A1900">%% //example.org/path/to/res?edit=1</span></span>
+<span style="font-weight: bold"><span style="color: #000000">cowboy_req:uri</span></span>(<span style="color: #009900">Req</span>, #{<span style="color: #0000FF">scheme</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">undefined</span>})<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">Serialized origin for use in the origin header</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-style: italic"><span style="color: #9A1900">%% </span></span><span style="text-decoration: underline"><span style="color: #0000FF">http://example.org</span></span>
+<span style="font-weight: bold"><span style="color: #000000">cowboy_req:uri</span></span>(<span style="color: #009900">Req</span>, #{<span style="color: #0000FF">path</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">undefined</span>, <span style="color: #0000FF">qs</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">undefined</span>})<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">HTTP/1.1 origin form (path and query string only)</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-style: italic"><span style="color: #9A1900">%% /path/to/res?edit=1</span></span>
+<span style="font-weight: bold"><span style="color: #000000">cowboy_req:uri</span></span>(<span style="color: #009900">Req</span>, #{<span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="color: #000080">undefined</span>})<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">Add a fragment to the URI</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-style: italic"><span style="color: #9A1900">%% </span></span><span style="text-decoration: underline"><span style="color: #0000FF">http://example.org/path/to/res</span></span><span style="font-style: italic"><span style="color: #9A1900">?edit=1#errors</span></span>
+<span style="font-weight: bold"><span style="color: #000000">cowboy_req:uri</span></span>(<span style="color: #009900">Req</span>, #{<span style="color: #0000FF">fragment</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"errors"</span><span style="color: #990000">&gt;&gt;</span>})<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">Ensure the scheme is HTTPS</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-style: italic"><span style="color: #9A1900">%% </span></span><span style="text-decoration: underline"><span style="color: #0000FF">https://example.org/path/to/res</span></span><span style="font-style: italic"><span style="color: #9A1900">?edit=1</span></span>
+<span style="font-weight: bold"><span style="color: #000000">cowboy_req:uri</span></span>(<span style="color: #009900">Req</span>, #{<span style="color: #0000FF">scheme</span> <span style="color: #990000">=&gt;</span> <span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"https"</span><span style="color: #990000">&gt;&gt;</span>})<span style="color: #990000">.</span></tt></pre></div></div>
+<div class="listingblock">
+<div class="title">Convert the URI to a binary string</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">iolist_to_binary</span></span>(<span style="font-weight: bold"><span style="color: #000000">cowboy_req:uri</span></span>(<span style="color: #009900">Req</span>))<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy_req">cowboy_req(3)</a>,
+<a href="../cowboy_req.scheme">cowboy_req:scheme(3)</a>,
+<a href="../cowboy_req.host">cowboy_req:host(3)</a>,
+<a href="../cowboy_req.port">cowboy_req:port(3)</a>,
+<a href="../cowboy_req.path">cowboy_req:path(3)</a>,
+<a href="../cowboy_req.qs">cowboy_req:qs(3)</a></p></div>
+</div>
+</div>
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.version/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.version/index.html
new file mode 100644
index 00000000..d44ed468
--- /dev/null
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.version/index.html
@@ -0,0 +1,226 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.16" />
+
+ <title>Nine Nines: cowboy_req:version(3)</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>cowboy_req:version(3)</span></h1>
+
+<div class="sect1">
+<h2 id="_name">Name</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>cowboy_req:version - HTTP version</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_description">Description</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">version</span></span>(<span style="color: #009900">Req</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:req</span></span>()) <span style="color: #990000">-&gt;</span> <span style="color: #009900">Version</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_version</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Return the HTTP version used for the request.</p></div>
+<div class="paragraph"><p>The version can also be obtained using pattern matching:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>#{<span style="color: #FF6600">version</span> <span style="color: #990000">:=</span> <span style="color: #009900">Version</span>} <span style="color: #990000">=</span> <span style="color: #009900">Req</span><span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_arguments">Arguments</h2>
+<div class="sectionbody">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+Req
+</dt>
+<dd>
+<p>
+The Req object.
+</p>
+</dd>
+</dl></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_return_value">Return value</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The HTTP version used for the request is returned as an
+atom. It is provided for informative purposes only.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_changelog">Changelog</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<strong>2.0</strong>: Only the version is returned, it is no longer wrapped in a tuple.
+</p>
+</li>
+<li>
+<p>
+<strong>1.0</strong>: Function introduced.
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_examples">Examples</h2>
+<div class="sectionbody">
+<div class="listingblock">
+<div class="title">Get the HTTP version</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Version</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:version</span></span>(<span style="color: #009900">Req</span>)<span style="color: #990000">.</span></tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy_req">cowboy_req(3)</a></p></div>
+</div>
+</div>
+
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Cowboy
+ 2.0
+ Function Reference
+
+</h3>
+
+<ul>
+
+ <li><a href="/docs/en/cowboy/2.0/guide">User Guide</a></li>
+
+
+ <li><a href="/docs/en/cowboy/2.0/manual">Function Reference</a></li>
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/cowboy/1.0/manual">1.0</a></li>
+
+ <li><a href="/docs/en/cowboy/2.0/manual">2.0</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req/index.html b/docs/en/cowboy/2.0/manual/cowboy_req/index.html
index d895d890..cc425f2b 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req/index.html
@@ -78,1277 +78,363 @@
<div class="sect1">
<h2 id="_description">Description</h2>
<div class="sectionbody">
-<div class="paragraph"><p>The <code>cowboy_req</code> module provides functions to access, manipulate
+<div class="paragraph"><p>The module <code>cowboy_req</code> provides functions to access, manipulate
and respond to requests.</p></div>
-<div class="paragraph"><p>The functions in this module follow patterns for their return types,
-based on the kind of function.</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-access: <code>Value</code>
-</p>
-</li>
-<li>
-<p>
-action: <code>ok | {Result, Req} | {Result, Value, Req}</code>
-</p>
-</li>
-<li>
-<p>
-modification: <code>Req</code>
-</p>
-</li>
-<li>
-<p>
-question: <code>boolean()</code>
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Whenever <code>Req</code> is returned, you must use this returned value and
-ignore any previous you may have had. This value contains various
-values which are necessary for Cowboy to keep track of the request
-and response states.</p></div>
-<div class="paragraph"><p>All functions which perform an action should only be called once.
-This includes reading the request body or replying. Cowboy will
-throw an error on the second call when it detects suspicious behavior.</p></div>
-<div class="paragraph"><p>It is highly discouraged to pass the Req object to another process.
-Doing so and calling <code>cowboy_req</code> functions from it leads to
-undefined behavior.</p></div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_types">Types</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_body_opts_option">body_opts() = [Option]</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">Option</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">continue</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="font-weight: bold"><span style="color: #000080">length</span></span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">read_length</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">read_timeout</span>, <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()}
- | {<span style="color: #FF6600">transfer_decode</span>, <span style="font-weight: bold"><span style="color: #000000">transfer_decode_fun</span></span>(), <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}
- | {<span style="color: #FF6600">content_decode</span>, <span style="font-weight: bold"><span style="color: #000000">content_decode_fun</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Request body reading options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_cookie_opts_option">cookie_opts() = [Option]</h3>
-<div class="listingblock">
-<div class="content"><!-- Generator: GNU source-highlight 3.1.8
-by Lorenzo Bettini
-http://www.lorenzobettini.it
-http://www.gnu.org/software/src-highlite -->
-<pre><tt><span style="color: #009900">Option</span> <span style="color: #990000">=</span> {<span style="color: #FF6600">max_age</span>, <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()}
- | {<span style="color: #FF6600">domain</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">path</span>, <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}
- | {<span style="color: #FF6600">secure</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
- | {<span style="color: #FF6600">http_only</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}</tt></pre></div></div>
-<div class="paragraph"><p>Cookie options.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_req_opaque_to_the_user">req() - opaque to the user</h3>
-<div class="paragraph"><p>The Req object.</p></div>
-<div class="paragraph"><p>All functions in this module receive a <code>Req</code> as argument,
-and some of them return a new object labelled <code>Req2</code> in
-the function descriptions below.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_request_related_exports">Request related exports</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_binding_name_req_8594_binding_name_req_undefined">binding(Name, Req) &#8594; binding(Name, Req, undefined)</h3>
-<div class="paragraph"><p>Alias of <code>cowboy_req:binding/3</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_binding_name_req_default_8594_value">binding(Name, Req, Default) &#8594; Value</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = atom()
-</dt>
-<dd>
-<p>
-Binding name.
-</p>
-</dd>
-<dt class="hdlist1">
-Default = any()
-</dt>
-<dd>
-<p>
-Default value.
-</p>
-</dd>
-<dt class="hdlist1">
-Value = any() | Default
-</dt>
-<dd>
-<p>
-Binding value.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the value for the given binding.</p></div>
-<div class="paragraph"><p>By default the value is a binary, however constraints may change
-the type of this value (for example automatically converting
-numbers to integer).</p></div>
-</div>
-<div class="sect2">
-<h3 id="_bindings_req_8594_name_value">bindings(Req) &#8594; [{Name, Value}]</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = atom()
-</dt>
-<dd>
-<p>
-Binding name.
-</p>
-</dd>
-<dt class="hdlist1">
-Value = any()
-</dt>
-<dd>
-<p>
-Binding value.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return all bindings.</p></div>
-<div class="paragraph"><p>By default the value is a binary, however constraints may change
-the type of this value (for example automatically converting
-numbers to integer).</p></div>
-</div>
-<div class="sect2">
-<h3 id="_header_name_req_8594_header_name_req_undefined">header(Name, Req) &#8594; header(Name, Req, undefined)</h3>
-<div class="paragraph"><p>Alias of <code>cowboy_req:header/3</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_header_name_req_default_8594_value">header(Name, Req, Default) &#8594; Value</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = binary()
-</dt>
-<dd>
-<p>
-Request header name.
-</p>
-</dd>
-<dt class="hdlist1">
-Default = any()
-</dt>
-<dd>
-<p>
-Default value.
-</p>
-</dd>
-<dt class="hdlist1">
-Value = binary() | Default
-</dt>
-<dd>
-<p>
-Request header value.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the value for the given header.</p></div>
-<div class="paragraph"><p>While header names are case insensitive, this function expects
-the name to be a lowercase binary.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_headers_req_8594_headers">headers(Req) &#8594; Headers</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Headers = cowboy:http_headers()
-</dt>
-<dd>
-<p>
-Request headers.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return all headers.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_host_req_8594_host">host(Req) &#8594; Host</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Host = binary()
-</dt>
-<dd>
-<p>
-Requested host.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the requested host.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_host_info_req_8594_hostinfo">host_info(Req) &#8594; HostInfo</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-HostInfo = cowboy_router:tokens() | undefined
-</dt>
-<dd>
-<p>
-Extra tokens for the host.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the extra tokens from matching against <code>...</code> during routing.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_host_url_req_8594_hosturl">host_url(Req) &#8594; HostURL</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-HostURL = binary() | undefined
-</dt>
-<dd>
-<p>
-Requested URL, without the path component.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the requested URL excluding the path component.</p></div>
-<div class="paragraph"><p>This function will always return <code>undefined</code> until the
-<code>cowboy_router</code> middleware has been executed.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_match_cookies_fields_req_8594_map">match_cookies(Fields, Req) &#8594; Map</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fields = cowboy:fields()
-</dt>
-<dd>
-<p>
-Cookie fields match rules.
-</p>
-</dd>
-<dt class="hdlist1">
-Map = map()
-</dt>
-<dd>
-<p>
-Cookie fields matched.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Match cookies against the given fields.</p></div>
-<div class="paragraph"><p>Cowboy will only return the cookie values specified in the
-fields list, and ignore all others. Fields can be either
-the name of the cookie requested; the name along with a
-list of constraints; or the name, a list of constraints
-and a default value in case the cookie is missing.</p></div>
-<div class="paragraph"><p>This function will crash if the cookie is missing and no
-default value is provided. This function will also crash
-if a constraint fails.</p></div>
-<div class="paragraph"><p>The name of the cookie must be provided as an atom. The
-key of the returned map will be that atom. The value may
-be converted through the use of constraints, making this
-function able to extract, validate and convert values all
-in one step.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_match_qs_fields_req_8594_map">match_qs(Fields, Req) &#8594; Map</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fields = cowboy:fields()
-</dt>
-<dd>
-<p>
-Query string fields match rules.
-</p>
-</dd>
-<dt class="hdlist1">
-Map = map()
-</dt>
-<dd>
-<p>
-Query string fields matched.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Match the query string against the given fields.</p></div>
-<div class="paragraph"><p>Cowboy will only return the query string values specified
-in the fields list, and ignore all others. Fields can be
-either the key requested; the key along with a list of
-constraints; or the key, a list of constraints and a
-default value in case the key is missing.</p></div>
-<div class="paragraph"><p>This function will crash if the key is missing and no
-default value is provided. This function will also crash
-if a constraint fails.</p></div>
-<div class="paragraph"><p>The key must be provided as an atom. The key of the
-returned map will be that atom. The value may be converted
-through the use of constraints, making this function able
-to extract, validate and convert values all in one step.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_meta_name_req_8594_meta_name_req_undefined">meta(Name, Req) &#8594; meta(Name, Req, undefined)</h3>
-<div class="paragraph"><p>Alias for <code>cowboy_req:meta/3</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_meta_name_req_default_8594_value">meta(Name, Req, Default) &#8594; Value</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = atom()
-</dt>
-<dd>
-<p>
-Metadata name.
-</p>
-</dd>
-<dt class="hdlist1">
-Default = any()
-</dt>
-<dd>
-<p>
-Default value.
-</p>
-</dd>
-<dt class="hdlist1">
-Value = any()
-</dt>
-<dd>
-<p>
-Metadata value.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return metadata about the request.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_method_req_8594_method">method(Req) &#8594; Method</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Method = binary()
-</dt>
-<dd>
-<p>
-Request method.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the method.</p></div>
-<div class="paragraph"><p>Methods are case sensitive. Standard methods are always uppercase.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_parse_cookies_req_8594_name_value">parse_cookies(Req) &#8594; [{Name, Value}]</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = binary()
-</dt>
-<dd>
-<p>
-Cookie name.
-</p>
-</dd>
-<dt class="hdlist1">
-Value = binary()
-</dt>
-<dd>
-<p>
-Cookie value.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Parse and return all cookies.</p></div>
-<div class="paragraph"><p>Cookie names are case sensitive.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_parse_header_name_req_8594_see_below">parse_header(Name, Req) &#8594; see below</h3>
-<div class="paragraph"><p>Alias of <code>cowboy_req:parse_header/3</code>.</p></div>
-<div class="paragraph"><p>The <code>parse_header/2</code> function will call <code>parser_header/3</code> with a
-different default value depending on the header being parsed. The
-following table summarizes the default values used.</p></div>
+<div class="paragraph"><p>There are four types of functions in this module. They can be
+differentiated by their name and their return type:</p></div>
<div class="tableblock">
<table rules="all"
width="100%"
frame="border"
cellspacing="0" cellpadding="4">
-<col width="50%" />
-<col width="50%" />
+<col width="33%" />
+<col width="33%" />
+<col width="33%" />
<thead>
<tr>
-<th align="left" valign="top"> Header name </th>
-<th align="center" valign="top"> Header value</th>
+<th align="left" valign="top"> Type </th>
+<th align="left" valign="top"> Name pattern </th>
+<th align="left" valign="top"> Return type</th>
</tr>
</thead>
<tbody>
<tr>
-<td align="left" valign="top"><p class="table">content-length</p></td>
-<td align="center" valign="top"><p class="table"><code>0</code></p></td>
+<td align="left" valign="top"><p class="table">access</p></td>
+<td align="left" valign="top"><p class="table">no verb, parse_*, match_*</p></td>
+<td align="left" valign="top"><p class="table"><code>Value</code></p></td>
</tr>
<tr>
-<td align="left" valign="top"><p class="table">cookie</p></td>
-<td align="center" valign="top"><p class="table"><code>[]</code></p></td>
+<td align="left" valign="top"><p class="table">question</p></td>
+<td align="left" valign="top"><p class="table">has_*</p></td>
+<td align="left" valign="top"><p class="table"><code>boolean()</code></p></td>
</tr>
<tr>
-<td align="left" valign="top"><p class="table">transfer-encoding</p></td>
-<td align="center" valign="top"><p class="table"><code>[&lt;&lt;"identity"&gt;&gt;]</code></p></td>
+<td align="left" valign="top"><p class="table">modification</p></td>
+<td align="left" valign="top"><p class="table">set_*</p></td>
+<td align="left" valign="top"><p class="table"><code>Req</code></p></td>
</tr>
<tr>
-<td align="left" valign="top"><p class="table">Any other header</p></td>
-<td align="center" valign="top"><p class="table"><code>undefined</code></p></td>
+<td align="left" valign="top"><p class="table">action</p></td>
+<td align="left" valign="top"><p class="table">any other verb</p></td>
+<td align="left" valign="top"><p class="table"><code>ok | {Result, Value, Req}</code></p></td>
</tr>
</tbody>
</table>
</div>
+<div class="paragraph"><p>Any <code>Req</code> returned must be used in place of the one passed as
+argument. Functions that perform an action in particular write
+state in the Req object to make sure you are using the function
+correctly. For example, it&#8217;s only possible to send one response,
+and to read the body once.</p></div>
</div>
-<div class="sect2">
-<h3 id="_parse_header_name_req_default_8594_parsedvalue_default">parse_header(Name, Req, Default) &#8594; ParsedValue | Default</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = binary()
-</dt>
-<dd>
-<p>
-Request header name.
-</p>
-</dd>
-<dt class="hdlist1">
-Default = any()
-</dt>
-<dd>
-<p>
-Default value.
-</p>
-</dd>
-<dt class="hdlist1">
-ParsedValue - see below
-</dt>
-<dd>
-<p>
-Parsed request header value.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Parse the given header.</p></div>
-<div class="paragraph"><p>While header names are case insensitive, this function expects
-the name to be a lowercase binary.</p></div>
-<div class="paragraph"><p>The parsed value differs depending on the header being parsed. The
-following table summarizes the different types returned.</p></div>
-<div class="tableblock">
-<table rules="all"
-width="100%"
-frame="border"
-cellspacing="0" cellpadding="4">
-<col width="50%" />
-<col width="50%" />
-<thead>
-<tr>
-<th align="left" valign="top"> Header name </th>
-<th align="center" valign="top"> Type of parsed header value</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="left" valign="top"><p class="table">accept</p></td>
-<td align="center" valign="top"><p class="table"><code>[{{Type, SubType, Params}, Quality, AcceptExt}]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">accept-charset</p></td>
-<td align="center" valign="top"><p class="table"><code>[{Charset, Quality}]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">accept-encoding</p></td>
-<td align="center" valign="top"><p class="table"><code>[{Encoding, Quality}]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">accept-language</p></td>
-<td align="center" valign="top"><p class="table"><code>[{LanguageTag, Quality}]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">authorization</p></td>
-<td align="center" valign="top"><p class="table"><code>{AuthType, Credentials}</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content-length</p></td>
-<td align="center" valign="top"><p class="table"><code>non_neg_integer()</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">content-type</p></td>
-<td align="center" valign="top"><p class="table"><code>{Type, SubType, ContentTypeParams}</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">cookie</p></td>
-<td align="center" valign="top"><p class="table"><code>[{binary(), binary()}]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">expect</p></td>
-<td align="center" valign="top"><p class="table"><code>[Expect | {Expect, ExpectValue, Params}]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">if-match</p></td>
-<td align="center" valign="top"><p class="table"><code>'*' | [{weak | strong, OpaqueTag}]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">if-modified-since</p></td>
-<td align="center" valign="top"><p class="table"><code>calendar:datetime()</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">if-none-match</p></td>
-<td align="center" valign="top"><p class="table"><code>'*' | [{weak | strong, OpaqueTag}]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">if-unmodified-since</p></td>
-<td align="center" valign="top"><p class="table"><code>calendar:datetime()</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">range</p></td>
-<td align="center" valign="top"><p class="table"><code>{Unit, [Range]}</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">sec-websocket-protocol</p></td>
-<td align="center" valign="top"><p class="table"><code>[binary()]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">transfer-encoding</p></td>
-<td align="center" valign="top"><p class="table"><code>[binary()]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">upgrade</p></td>
-<td align="center" valign="top"><p class="table"><code>[binary()]</code></p></td>
-</tr>
-<tr>
-<td align="left" valign="top"><p class="table">x-forwarded-for</p></td>
-<td align="center" valign="top"><p class="table"><code>[binary()]</code></p></td>
-</tr>
-</tbody>
-</table>
</div>
-<div class="paragraph"><p>Types for the above table:</p></div>
+<div class="sect1">
+<h2 id="_exports">Exports</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Raw request:</p></div>
<div class="ulist"><ul>
<li>
<p>
-Type = SubType = Charset = Encoding = LanguageTag = binary()
+<a href="../cowboy_req.method">cowboy_req:method(3)</a> - HTTP method
</p>
</li>
<li>
<p>
-AuthType = Expect = OpaqueTag = Unit = binary()
+<a href="../cowboy_req.version">cowboy_req:version(3)</a> - HTTP version
</p>
</li>
<li>
<p>
-Params = ContentTypeParams = [{binary(), binary()}]
+<a href="../cowboy_req.scheme">cowboy_req:scheme(3)</a> - URI scheme
</p>
</li>
<li>
<p>
-Quality = 0..1000
+<a href="../cowboy_req.host">cowboy_req:host(3)</a> - URI host name
</p>
</li>
<li>
<p>
-AcceptExt = [{binary(), binary()} | binary()]
+<a href="../cowboy_req.port">cowboy_req:port(3)</a> - URI port number
</p>
</li>
<li>
<p>
-Credentials - see below
+<a href="../cowboy_req.path">cowboy_req:path(3)</a> - URI path
</p>
</li>
<li>
<p>
-Range = {non_neg_integer(), non_neg_integer() | infinity} | neg_integer()
+<a href="../cowboy_req.qs">cowboy_req:qs(3)</a> - URI query string
</p>
</li>
-</ul></div>
-<div class="paragraph"><p>The cookie names and values, the values of the sec-websocket-protocol
-and x-forwarded-for headers, the values in <code>AcceptExt</code> and <code>Params</code>,
-the authorization <code>Credentials</code>, the <code>ExpectValue</code> and <code>OpaqueTag</code>
-are case sensitive. All values in <code>ContentTypeParams</code> are case sensitive
-except the value of the charset parameter, which is case insensitive.
-All other values are case insensitive and will be returned as lowercase.</p></div>
-<div class="paragraph"><p>The headers accept, accept-encoding and cookie headers can return
-an empty list. Some other headers are expected to have a value if provided
-and may crash if the value is missing.</p></div>
-<div class="paragraph"><p>The authorization header parsing code currently only supports basic
-HTTP authentication. The <code>Credentials</code> type is thus <code>{Username, Password}</code>
-with <code>Username</code> and <code>Password</code> being <code>binary()</code>.</p></div>
-<div class="paragraph"><p>The range header value <code>Range</code> can take three forms:</p></div>
-<div class="ulist"><ul>
<li>
<p>
-<code>{From, To}</code>: from <code>From</code> to <code>To</code> units
+<a href="../cowboy_req.uri">cowboy_req:uri(3)</a> - Reconstructed URI
</p>
</li>
<li>
<p>
-<code>{From, infinity}</code>: everything after <code>From</code> units
+<a href="../cowboy_req.header">cowboy_req:header(3)</a> - HTTP header
</p>
</li>
<li>
<p>
-<code>-Final</code>: the final <code>Final</code> units
+<a href="../cowboy_req.headers">cowboy_req:headers(3)</a> - HTTP headers
</p>
</li>
-</ul></div>
-<div class="paragraph"><p>An <code>undefined</code> tuple will be returned if Cowboy doesn&#8217;t know how
-to parse the requested header.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_parse_qs_req_8594_name_value">parse_qs(Req) &#8594; [{Name, Value}]</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = binary()
-</dt>
-<dd>
-<p>
-Query string field name.
-</p>
-</dd>
-<dt class="hdlist1">
-Value = binary() | true
-</dt>
-<dd>
-<p>
-Query string field value.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the request&#8217;s query string as a list of tuples.</p></div>
-<div class="paragraph"><p>The atom <code>true</code> is returned for keys which have no value.
-Keys with no value are different from keys with an empty
-value in that they do not have a <code>=</code> indicating the presence
-of a value.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_path_req_8594_path">path(Req) &#8594; Path</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Path = binary()
-</dt>
-<dd>
-<p>
-Requested path.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the requested path.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_path_info_req_8594_pathinfo">path_info(Req) &#8594; PathInfo</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-PathInfo = cowboy_router:tokens() | undefined
-</dt>
-<dd>
+<li>
<p>
-Extra tokens for the path.
+<a href="../cowboy_req.peer">cowboy_req:peer(3)</a> - Peer address and port
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the extra tokens from matching against <code>...</code> during routing.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_peer_req_8594_peer">peer(Req) &#8594; Peer</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Peer = <code>{inet:ip_address(), inet:port_number()}</code>
-</dt>
-<dd>
+</li>
+</ul></div>
+<div class="paragraph"><p>Processed request:</p></div>
+<div class="ulist"><ul>
+<li>
<p>
-Peer IP address and port number.
+<a href="../cowboy_req.parse_qs">cowboy_req:parse_qs(3)</a> - Parse the query string
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the client&#8217;s IP address and port number.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_port_req_8594_port">port(Req) &#8594; Port</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Port = inet:port_number()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Requested port number.
+<a href="../cowboy_req.match_qs">cowboy_req:match_qs(3)</a> - Match the query string against constraints
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the request&#8217;s port.</p></div>
-<div class="paragraph"><p>The port returned by this function is obtained by parsing
-the host header. It may be different than the actual port
-the client used to connect to the Cowboy server.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_qs_req_8594_querystring">qs(Req) &#8594; QueryString</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-QueryString = binary()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Unprocessed query string.
+<a href="../cowboy_req.parse_header">cowboy_req:parse_header(3)</a> - Parse the given HTTP header
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the request&#8217;s query string.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_set_meta_name_value_req_8594_req2">set_meta(Name, Value, Req) &#8594; Req2</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = atom()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Metadata name.
+<a href="../cowboy_req.parse_cookies">cowboy_req:parse_cookies(3)</a> - Parse cookie headers
</p>
-</dd>
-<dt class="hdlist1">
-Value = any()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Metadata value.
+<a href="../cowboy_req.match_cookies">cowboy_req:match_cookies(3)</a> - Match cookies against constraints
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set metadata about the request.</p></div>
-<div class="paragraph"><p>An existing value will be overwritten.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_url_req_8594_url">url(Req) &#8594; URL</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-URL = binary() | undefined
-</dt>
-<dd>
+</li>
+<li>
<p>
-Requested URL.
+<a href="../cowboy_req.binding">cowboy_req:binding(3)</a> - Access a value bound from the route
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the requested URL.</p></div>
-<div class="paragraph"><p>This function will always return <code>undefined</code> until the
-<code>cowboy_router</code> middleware has been executed.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_version_req_8594_version">version(Req) &#8594; Version</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Version = cowboy:http_version()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Client&#8217;s advertised HTTP version.
+<a href="../cowboy_req.bindings">cowboy_req:bindings(3)</a> - Access all values bound from the route
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the HTTP version used for this request.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_request_body_related_exports">Request body related exports</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_body_req_8594_body_req">body(Req) &#8594; body(Req, [])</h3>
-<div class="paragraph"><p>Alias of <code>cowboy_req:body/2</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_body_req_opts_8594_ok_data_req2_more_data_req2">body(Req, Opts) &#8594; {ok, Data, Req2} | {more, Data, Req2}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Opts = [body_opt()]
-</dt>
-<dd>
+</li>
+<li>
<p>
-Request body reading options.
+<a href="../cowboy_req.host_info">cowboy_req:host_info(3)</a> - Access the route&#8217;s heading host segments
</p>
-</dd>
-<dt class="hdlist1">
-Data = binary()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Data read from the body.
+<a href="../cowboy_req.path_info">cowboy_req:path_info(3)</a> - Access the route&#8217;s trailing path segments
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Read the request body.</p></div>
-<div class="paragraph"><p>This function will read a chunk of the request body. If there is
-more data to be read after this function call, then a <code>more</code> tuple
-is returned. Otherwise an <code>ok</code> tuple is returned.</p></div>
-<div class="paragraph"><p>Cowboy will automatically send a <code>100 Continue</code> reply if
-required. If this behavior is not desirable, it can be disabled
-by setting the <code>continue</code> option to <code>false</code>.</p></div>
-<div class="paragraph"><p>Cowboy will by default attempt to read up to 8MB of the body,
-but in chunks of 1MB. It will use a timeout of 15s per chunk.
-All these values can be changed using the <code>length</code>, <code>read_length</code>
-and <code>read_timeout</code> options respectively. Note that the size
-of the data may not be the same as requested as the decoding
-functions may grow or shrink it, and Cowboy makes not attempt
-at returning an exact amount.</p></div>
-<div class="paragraph"><p>Cowboy will properly handle chunked transfer-encoding by
-default. If any other transfer-encoding or content-encoding
-has been used for the request, custom decoding functions
-can be used. The <code>content_decode</code> and <code>transfer_decode</code>
-options allow setting the decode functions manually.</p></div>
-<div class="paragraph"><p>After the body has been streamed fully, Cowboy will remove
-the transfer-encoding header from the Req object, and add
-the content-length header if it wasn&#8217;t already there.</p></div>
-<div class="paragraph"><p>This function can only be called once. Cowboy will not cache
-the result of this call.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_body_length_req_8594_length">body_length(Req) &#8594; Length</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Length = non_neg_integer() | undefined
-</dt>
-<dd>
+</li>
+</ul></div>
+<div class="paragraph"><p>Request body:</p></div>
+<div class="ulist"><ul>
+<li>
<p>
-Length of the request body.
+<a href="../cowboy_req.has_body">cowboy_req:has_body(3)</a> - Is there a request body?
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the length of the request body.</p></div>
-<div class="paragraph"><p>The length will only be returned if the request does not
-use any transfer-encoding and if the content-length header
-is present.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_body_qs_req_8594_body_qs_req_length_64000_read_length_64000_read_timeout_5000">body_qs(Req) &#8594; body_qs(Req, [{length, 64000}, {read_length, 64000}, {read_timeout, 5000}])</h3>
-<div class="paragraph"><p>Alias of <code>cowboy_req:body_qs/2</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_body_qs_req_opts_8594_ok_name_value_req2_badlength_req2">body_qs(Req, Opts) &#8594; {ok, [{Name, Value}], Req2} | {badlength, Req2}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Opts = [body_opt()]
-</dt>
-<dd>
+</li>
+<li>
<p>
-Request body reading options.
+<a href="../cowboy_req.body_length">cowboy_req:body_length(3)</a> - Body length
</p>
-</dd>
-<dt class="hdlist1">
-Name = binary()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Field name.
+<a href="../cowboy_req.read_body">cowboy_req:read_body(3)</a> - Read the request body
</p>
-</dd>
-<dt class="hdlist1">
-Value = binary() | true
-</dt>
-<dd>
+</li>
+<li>
<p>
-Field value.
+<a href="../cowboy_req.read_urlencoded_body">cowboy_req:read_urlencoded_body(3)</a> - Read and parse a urlencoded request body
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return the request body as a list of tuples.</p></div>
-<div class="paragraph"><p>This function will parse the body assuming the content-type
-application/x-www-form-urlencoded, commonly used for the
-query string.</p></div>
-<div class="paragraph"><p>This function calls <code>body/2</code> for reading the body, with the
-same options it received. By default it will attempt to read
-a body of 64KB in one chunk, with a timeout of 5s. If the
-body is larger then a <code>badlength</code> tuple is returned.</p></div>
-<div class="paragraph"><p>This function can only be called once. Cowboy will not cache
-the result of this call.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_has_body_req_8594_boolean">has_body(Req) &#8594; boolean()</h3>
-<div class="paragraph"><p>Return whether the request has a body.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_part_req_8594_part_req_length_64000_read_length_64000_read_timeout_5000">part(Req) &#8594; part(Req, [{length, 64000}, {read_length, 64000}, {read_timeout, 5000}])</h3>
-<div class="paragraph"><p>Alias of <code>cowboy_req:part/2</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_part_req_opts_8594_ok_headers_req2_done_req2">part(Req, Opts) &#8594; {ok, Headers, Req2} | {done, Req2}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Opts = [body_opt()]
-</dt>
-<dd>
+</li>
+<li>
<p>
-Request body reading options.
+<a href="../cowboy_req.read_part">cowboy_req:read_part(3)</a> - Read the next part of a multipart body
</p>
-</dd>
-<dt class="hdlist1">
-Headers = cow_multipart:headers()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Part&#8217;s headers.
+<a href="../cowboy_req.read_part_body">cowboy_req:read_part_body(3)</a> - Read the current part&#8217;s body in a multipart body
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Read the headers for the next part of the multipart message.</p></div>
-<div class="paragraph"><p>Cowboy will skip any data remaining until the beginning of
-the next part. This includes the preamble to the multipart
-message but also the body of a previous part if it hasn&#8217;t
-been read. Both are skipped automatically when calling this
-function.</p></div>
-<div class="paragraph"><p>The headers returned are MIME headers, NOT HTTP headers.
-They can be parsed using the functions from the <code>cow_multipart</code>
-module. In addition, the <code>cow_multipart:form_data/1</code> function
-can be used to quickly figure out <code>multipart/form-data</code> messages.
-It takes the list of headers and returns whether this part is
-a simple form field or a file being uploaded.</p></div>
-<div class="paragraph"><p>Note that once a part has been read, or skipped, it cannot
-be read again.</p></div>
-<div class="paragraph"><p>This function calls <code>body/2</code> for reading the body, with the
-same options it received. By default it will only read chunks
-of 64KB with a timeout of 5s. This is tailored for reading
-part headers, not for skipping the previous part&#8217;s body.
-You might want to consider skipping large parts manually.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_part_body_req_8594_part_body_req">part_body(Req) &#8594; part_body(Req, [])</h3>
-<div class="paragraph"><p>Alias of <code>cowboy_req:part_body/2</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_part_body_req_opts_8594_ok_data_req2_more_data_req2">part_body(Req, Opts) &#8594; {ok, Data, Req2} | {more, Data, Req2}</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Opts = [body_opt()]
-</dt>
-<dd>
+</li>
+</ul></div>
+<div class="paragraph"><p>Response:</p></div>
+<div class="ulist"><ul>
+<li>
<p>
-Request body reading options.
+<a href="../cowboy_req.set_resp_cookie">cowboy_req:set_resp_cookie(3)</a> - Set a cookie
</p>
-</dd>
-<dt class="hdlist1">
-Data = binary()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Part&#8217;s body.
+<a href="../cowboy_req.set_resp_header">cowboy_req:set_resp_header(3)</a> - Set a response header
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Read the body of the current part of the multipart message.</p></div>
-<div class="paragraph"><p>This function calls <code>body/2</code> for reading the body, with the
-same options it received. It uses the same defaults.</p></div>
-<div class="paragraph"><p>If there are more data to be read from the socket for this
-part, the function will return what it could read inside a
-<code>more</code> tuple. Otherwise, it will return an <code>ok</code> tuple.</p></div>
-<div class="paragraph"><p>Calling this function again after receiving a <code>more</code> tuple
-will return another chunk of body. The last chunk will be
-returned inside an <code>ok</code> tuple.</p></div>
-<div class="paragraph"><p>Note that once the body has been read, fully or partially,
-it cannot be read again.</p></div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_response_related_exports">Response related exports</h2>
-<div class="sectionbody">
-<div class="sect2">
-<h3 id="_chunk_data_req_8594_ok">chunk(Data, Req) &#8594; ok</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Data = iodata()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Chunk data to be sent.
+<a href="../cowboy_req.has_resp_header">cowboy_req:has_resp_header(3)</a> - Is the given response header set?
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Send a chunk of data.</p></div>
-<div class="paragraph"><p>This function should be called as many times as needed
-to send data chunks after calling <code>chunked_reply/{2,3}</code>.</p></div>
-<div class="paragraph"><p>When the method is HEAD, no data will actually be sent.</p></div>
-<div class="paragraph"><p>If the request uses HTTP/1.0, the data is sent directly
-without wrapping it in an HTTP/1.1 chunk, providing
-compatibility with older clients.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_chunked_reply_statuscode_req_8594_chunked_reply_statuscode_req">chunked_reply(StatusCode, Req) &#8594; chunked_reply(StatusCode, [], Req)</h3>
-<div class="paragraph"><p>Alias of <code>cowboy_req:chunked_reply/3</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_chunked_reply_statuscode_headers_req_8594_req2">chunked_reply(StatusCode, Headers, Req) &#8594; Req2</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-StatusCode = cowboy:http_status()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Response status code.
+<a href="../cowboy_req.delete_resp_header">cowboy_req:delete_resp_header(3)</a> - Delete a response header
</p>
-</dd>
-<dt class="hdlist1">
-Headers = cowboy:http_headers()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Response headers.
+<a href="../cowboy_req.set_resp_body">cowboy_req:set_resp_body(3)</a> - Set the response body
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Send a response using chunked transfer-encoding.</p></div>
-<div class="paragraph"><p>This function effectively sends the response status line
-and headers to the client.</p></div>
-<div class="paragraph"><p>This function will not send any body set previously. After
-this call the handler must use the <code>chunk/2</code> function
-repeatedly to send the body in as many chunks as needed.</p></div>
-<div class="paragraph"><p>If the request uses HTTP/1.0, the data is sent directly
-without wrapping it in an HTTP/1.1 chunk, providing
-compatibility with older clients.</p></div>
-<div class="paragraph"><p>This function can only be called once, with the exception
-of overriding the response in the <code>onresponse</code> hook.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_continue_req_8594_ok">continue(Req) &#8594; ok</h3>
-<div class="paragraph"><p>Send a 100 Continue intermediate reply.</p></div>
-<div class="paragraph"><p>This reply is required before the client starts sending the
-body when the request contains the <code>expect</code> header with the
-<code>100-continue</code> value.</p></div>
-<div class="paragraph"><p>Cowboy will send this automatically when required. However
-you may want to do it manually by disabling this behavior
-with the <code>continue</code> body option and then calling this
-function.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_delete_resp_header_name_req_8594_req2">delete_resp_header(Name, Req) &#8594; Req2</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = binary()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Response header name.
+<a href="../cowboy_req.has_resp_body">cowboy_req:has_resp_body(3)</a> - Is there a response body?
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Delete the given response header.</p></div>
-<div class="paragraph"><p>While header names are case insensitive, this function expects
-the name to be a lowercase binary.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_has_resp_body_req_8594_boolean">has_resp_body(Req) &#8594; boolean()</h3>
-<div class="paragraph"><p>Return whether a response body has been set.</p></div>
-<div class="paragraph"><p>This function will return false if a response body has
-been set with a length of 0.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_has_resp_header_name_req_8594_boolean">has_resp_header(Name, Req) &#8594; boolean()</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = binary()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Response header name.
+<a href="../cowboy_req.reply">cowboy_req:reply(3)</a> - Send the response
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Return whether the given response header has been set.</p></div>
-<div class="paragraph"><p>While header names are case insensitive, this function expects
-the name to be a lowercase binary.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_reply_statuscode_req_8594_reply_statuscode_req">reply(StatusCode, Req) &#8594; reply(StatusCode, [], Req)</h3>
-<div class="paragraph"><p>Alias of <code>cowboy_req:reply/3</code>.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_reply_statuscode_headers_req_see_below">reply(StatusCode, Headers, Req) - see below</h3>
-<div class="paragraph"><p>Alias of <code>cowboy_req:reply/4</code>, with caveats.</p></div>
-</div>
-<div class="sect2">
-<h3 id="_reply_statuscode_headers_body_req_8594_req2">reply(StatusCode, Headers, Body, Req) &#8594; Req2</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-StatusCode = cowboy:http_status()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Response status code.
+<a href="../cowboy_req.stream_reply">cowboy_req:stream_reply(3)</a> - Send the response and stream its body
</p>
-</dd>
-<dt class="hdlist1">
-Headers = cowboy:http_headers()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Response headers.
+<a href="../cowboy_req.stream_body">cowboy_req:stream_body(3)</a> - Send a chunk of the response body
</p>
-</dd>
-<dt class="hdlist1">
-Body = iodata()
-</dt>
-<dd>
+</li>
+<li>
<p>
-Response body.
+<a href="../cowboy_req.push">cowboy_req:push(3)</a> - Push a resource to the client
</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Send a response.</p></div>
-<div class="paragraph"><p>This function effectively sends the response status line,
-headers and body to the client, in a single send function
-call.</p></div>
-<div class="paragraph"><p>The <code>reply/2</code> and <code>reply/3</code> functions will send the body
-set previously, if any. The <code>reply/4</code> function overrides
-any body set previously and sends <code>Body</code> instead.</p></div>
-<div class="paragraph"><p>If a body function was set, and <code>reply/2</code> or <code>reply/3</code> was
-used, it will be called before returning.</p></div>
-<div class="paragraph"><p>No more data can be sent to the client after this function
-returns.</p></div>
-<div class="paragraph"><p>This function can only be called once, with the exception
-of overriding the response in the <code>onresponse</code> hook.</p></div>
+</li>
+</ul></div>
</div>
-<div class="sect2">
-<h3 id="_set_resp_body_body_req_8594_req2">set_resp_body(Body, Req) &#8594; Req2</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Body = iodata()
-</dt>
-<dd>
-<p>
-Response body.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set a response body.</p></div>
-<div class="paragraph"><p>This body will not be sent if <code>chunked_reply/{2,3}</code> or
-<code>reply/4</code> is used, as they override it.</p></div>
</div>
+<div class="sect1">
+<h2 id="_types">Types</h2>
+<div class="sectionbody">
<div class="sect2">
-<h3 id="_set_resp_body_fun_fun_req_8594_req2">set_resp_body_fun(Fun, Req) &#8594; Req2</h3>
-<div class="paragraph"><p>Alias of <code>cowboy_req:set_resp_body_fun/3</code>.</p></div>
+<h3 id="_push_opts">push_opts()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">push_opts</span></span>() <span style="color: #990000">::</span> #{
+ <span style="color: #0000FF">method</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
+ <span style="color: #0000FF">scheme</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span>
+ <span style="color: #0000FF">host</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span>
+ <span style="color: #0000FF">port</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>(),
+ <span style="color: #0000FF">qs</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>() <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
+}</tt></pre></div></div>
+<div class="paragraph"><p>Push options.</p></div>
+<div class="paragraph"><p>By default, Cowboy will use the GET method, an empty query string,
+and take the scheme, host and port directly from the current
+request&#8217;s URI.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_read_body_opts">read_body_opts()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">read_body_opts</span></span>() <span style="color: #990000">::</span> #{
+ <span style="font-weight: bold"><span style="color: #000080">length</span></span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(),
+ <span style="color: #0000FF">period</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>(),
+ <span style="color: #0000FF">timeout</span> <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000000">timeout</span></span>()
+}</tt></pre></div></div>
+<div class="paragraph"><p>Body reading options.</p></div>
+<div class="paragraph"><p>The defaults are function-specific.</p></div>
</div>
<div class="sect2">
-<h3 id="_set_resp_body_fun_length_fun_req_8594_req2">set_resp_body_fun(Length, Fun, Req) &#8594; Req2</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fun = fun((Socket, Transport) &#8594; ok)
-</dt>
-<dd>
-<p>
-Fun that will send the response body.
-</p>
-</dd>
-<dt class="hdlist1">
-Socket = inet:socket()
-</dt>
-<dd>
-<p>
-Socket for this connection.
-</p>
-</dd>
-<dt class="hdlist1">
-Transport = module()
-</dt>
-<dd>
-<p>
-Transport module for this socket.
-</p>
-</dd>
-<dt class="hdlist1">
-Length = non_neg_integer()
-</dt>
-<dd>
-<p>
-Length of the response body.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set a fun for sending the response body.</p></div>
-<div class="paragraph"><p>If a <code>Length</code> is provided, it will be sent in the
-content-length header in the response. It is recommended
-to set the length if it can be known in advance. Otherwise,
-the transfer-encoding header will be set to identity.</p></div>
-<div class="paragraph"><p>This function will only be called if the response is sent
-using the <code>reply/2</code> or <code>reply/3</code> function.</p></div>
-<div class="paragraph"><p>The fun will receive the Ranch <code>Socket</code> and <code>Transport</code> as
-arguments. Only send and sendfile operations are supported.</p></div>
+<h3 id="_req">req()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">req</span></span>() <span style="color: #990000">::</span> #{
+ <span style="color: #FF6600">method</span> <span style="color: #990000">:=</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
+ <span style="color: #FF6600">version</span> <span style="color: #990000">:=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_version</span></span>() | <span style="font-weight: bold"><span style="color: #000080">atom</span></span>(),
+ <span style="color: #FF6600">scheme</span> <span style="color: #990000">:=</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span>
+ <span style="color: #FF6600">host</span> <span style="color: #990000">:=</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="font-style: italic"><span style="color: #9A1900">%% lowercase; case insensitive</span></span>
+ <span style="color: #FF6600">port</span> <span style="color: #990000">:=</span> <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>(),
+ <span style="color: #FF6600">path</span> <span style="color: #990000">:=</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
+ <span style="color: #FF6600">qs</span> <span style="color: #990000">:=</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>(), <span style="font-style: italic"><span style="color: #9A1900">%% case sensitive</span></span>
+ <span style="color: #FF6600">headers</span> <span style="color: #990000">:=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy:http_headers</span></span>(),
+ <span style="color: #FF6600">peer</span> <span style="color: #990000">:=</span> {<span style="font-weight: bold"><span style="color: #000000">inet:ip_address</span></span>(), <span style="font-weight: bold"><span style="color: #000000">inet:port_number</span></span>()}
+}</tt></pre></div></div>
+<div class="paragraph"><p>The Req object.</p></div>
+<div class="paragraph"><p>Contains information about the request and response. While
+some fields are publicly documented, others aren&#8217;t and shouldn&#8217;t
+be used.</p></div>
+<div class="paragraph"><p>You may add custom fields if required. Make sure to namespace
+them by prepending an underscore and the name of your application:</p></div>
+<div class="listingblock">
+<div class="title">Setting a custom field</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #009900">Req</span>#{<span style="color: #009900">_myapp_auth_method</span> <span style="color: #990000">=&gt;</span> <span style="color: #FF6600">pubkey</span>}<span style="color: #990000">.</span></tt></pre></div></div>
</div>
<div class="sect2">
-<h3 id="_set_resp_body_fun_chunked_fun_req_8594_req2">set_resp_body_fun(chunked, Fun, Req) &#8594; Req2</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Fun = fun((ChunkFun) &#8594; ok)
-</dt>
-<dd>
-<p>
-Fun that will send the response body.
-</p>
-</dd>
-<dt class="hdlist1">
-ChunkFun = funiodata( &#8594; ok)
-</dt>
-<dd>
-<p>
-Fun to call for every chunk to be sent.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set a fun for sending the response body using chunked transfer-encoding.</p></div>
-<div class="paragraph"><p>This function will only be called if the response is sent
-using the <code>reply/2</code> or <code>reply/3</code> function.</p></div>
-<div class="paragraph"><p>The fun will receive another fun as argument. This fun is to
-be used to send chunks in a similar way to the <code>chunk/2</code> function,
-except the fun only takes one argument, the data to be sent in
-the chunk.</p></div>
+<h3 id="_resp_body">resp_body()</h3>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="font-weight: bold"><span style="color: #000000">resp_body</span></span>() <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">iodata</span></span>()
+ | {<span style="color: #FF6600">sendfile</span>, <span style="color: #009900">Offset</span>, <span style="color: #009900">Length</span>, <span style="color: #009900">Filename</span>}
+
+<span style="color: #009900">Offset</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">non_neg_integer</span></span>()
+<span style="color: #009900">Length</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">pos_integer</span></span>()
+<span style="color: #009900">Filename</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">file:name_all</span></span>()</tt></pre></div></div>
+<div class="paragraph"><p>Response body.</p></div>
+<div class="paragraph"><p>It can take two forms: the actual data to be sent or a
+tuple indicating which file to send.</p></div>
+<div class="paragraph"><p>When sending data directly, the type is either a binary or
+an iolist. Iolists are an efficient way to build output.
+Instead of concatenating strings or binaries, you can simply
+build a list containing the fragments you want to send in the
+order they should be sent:</p></div>
+<div class="listingblock">
+<div class="title">Example iolists usage</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt><span style="color: #993399">1</span><span style="color: #990000">&gt;</span> <span style="color: #009900">RespBody</span> <span style="color: #990000">=</span> [<span style="color: #FF0000">"Hello "</span>, [<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"world"</span><span style="color: #990000">&gt;&gt;</span>, <span style="color: #FF0000">$!</span>]]<span style="color: #990000">.</span>
+[<span style="color: #FF0000">"Hello "</span>,[<span style="color: #990000">&lt;&lt;</span><span style="color: #FF0000">"world"</span><span style="color: #990000">&gt;&gt;</span>,<span style="color: #993399">33</span>]]
+<span style="color: #993399">2</span><span style="color: #990000">&gt;</span> <span style="font-weight: bold"><span style="color: #000000">io:format</span></span>(<span style="color: #FF0000">"~s~n"</span>, [<span style="color: #009900">RespBody</span>])<span style="color: #990000">.</span>
+<span style="color: #009900">Hello</span> <span style="color: #FF6600">world</span><span style="color: #990000">!</span></tt></pre></div></div>
+<div class="paragraph"><p>When using the sendfile tuple, the <code>Length</code> value is mandatory
+and must be higher than 0. It is sent with the response in the
+content-length header.</p></div>
</div>
-<div class="sect2">
-<h3 id="_set_resp_cookie_name_value_opts_req_8594_req2">set_resp_cookie(Name, Value, Opts, Req) &#8594; Req2</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = iodata()
-</dt>
-<dd>
-<p>
-Cookie name.
-</p>
-</dd>
-<dt class="hdlist1">
-Value = iodata()
-</dt>
-<dd>
-<p>
-Cookie value.
-</p>
-</dd>
-<dt class="hdlist1">
-Opts = cookie_opts()
-</dt>
-<dd>
-<p>
-Cookie options.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set a cookie in the response.</p></div>
-<div class="paragraph"><p>Cookie names are case sensitive.</p></div>
</div>
-<div class="sect2">
-<h3 id="_set_resp_header_name_value_req_8594_req2">set_resp_header(Name, Value, Req) &#8594; Req2</h3>
-<div class="dlist"><dl>
-<dt class="hdlist1">
-Name = binary()
-</dt>
-<dd>
-<p>
-Response header name.
-</p>
-</dd>
-<dt class="hdlist1">
-Value = iodata()
-</dt>
-<dd>
-<p>
-Response header value.
-</p>
-</dd>
-</dl></div>
-<div class="paragraph"><p>Set a response header.</p></div>
-<div class="paragraph"><p>You should use <code>set_resp_cookie/4</code> instead of this function
-to set cookies.</p></div>
</div>
+<div class="sect1">
+<h2 id="_see_also">See also</h2>
+<div class="sectionbody">
+<div class="paragraph"><p><a href="../cowboy_app">cowboy(7)</a></p></div>
</div>
</div>
diff --git a/docs/en/cowboy/2.0/manual/index.html b/docs/en/cowboy/2.0/manual/index.html
index e1b3dbe4..0a3e1347 100644
--- a/docs/en/cowboy/2.0/manual/index.html
+++ b/docs/en/cowboy/2.0/manual/index.html
@@ -107,6 +107,61 @@
</li>
<li>
<p>
+<a href="cowboy_req.header">cowboy_req:header(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_req.headers">cowboy_req:headers(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_req.host">cowboy_req:host(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_req.method">cowboy_req:method(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_req.path">cowboy_req:path(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_req.peer">cowboy_req:peer(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_req.port">cowboy_req:port(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_req.qs">cowboy_req:qs(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_req.scheme">cowboy_req:scheme(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_req.uri">cowboy_req:uri(3)</a>
+</p>
+</li>
+<li>
+<p>
+<a href="cowboy_req.version">cowboy_req:version(3)</a>
+</p>
+</li>
+<li>
+<p>
<a href="cowboy_rest">cowboy_rest(3)</a>
</p>
</li>
diff --git a/docs/en/erlang.mk/1/guide/app.asciidoc b/docs/en/erlang.mk/1/guide/app.asciidoc
index eef5d45e..229ce973 100644
--- a/docs/en/erlang.mk/1/guide/app.asciidoc
+++ b/docs/en/erlang.mk/1/guide/app.asciidoc
@@ -130,6 +130,13 @@ your situation.
The application callback module.
`PROJECT_REGISTERED`::
List of the names of all registered processes.
+`PROJECT_ENV`::
+ Configuration parameters used by the application.
+`PROJECT_APP_EXTRA_KEYS`::
+ Other keys you want to add to the application `.app` file.
+ The variable content is written as-is to the `.app` file,
+ so be sure to format valid Erlang terms. For example:
+ `PROJECT_APP_EXTRA_KEYS = {maxT, 10000}, {start_phases, [...]}`.
`LOCAL_DEPS`::
List of Erlang/OTP applications this project depends on,
excluding `erts`, `kernel` and `stdlib`, or list of
diff --git a/docs/en/erlang.mk/1/guide/app/index.html b/docs/en/erlang.mk/1/guide/app/index.html
index 41721c9d..6131b394 100644
--- a/docs/en/erlang.mk/1/guide/app/index.html
+++ b/docs/en/erlang.mk/1/guide/app/index.html
@@ -232,6 +232,25 @@ your situation.</p></div>
</p>
</dd>
<dt class="hdlist1">
+<code>PROJECT_ENV</code>
+</dt>
+<dd>
+<p>
+ Configuration parameters used by the application.
+</p>
+</dd>
+<dt class="hdlist1">
+<code>PROJECT_APP_EXTRA_KEYS</code>
+</dt>
+<dd>
+<p>
+ Other keys you want to add to the application <code>.app</code> file.
+ The variable content is written as-is to the <code>.app</code> file,
+ so be sure to format valid Erlang terms. For example:
+ <code>PROJECT_APP_EXTRA_KEYS = {maxT, 10000}, {start_phases, [...]}</code>.
+</p>
+</dd>
+<dt class="hdlist1">
<code>LOCAL_DEPS</code>
</dt>
<dd>
diff --git a/docs/en/erlang.mk/1/guide/deps.asciidoc b/docs/en/erlang.mk/1/guide/deps.asciidoc
index eb6f2f0c..723deb0a 100644
--- a/docs/en/erlang.mk/1/guide/deps.asciidoc
+++ b/docs/en/erlang.mk/1/guide/deps.asciidoc
@@ -286,6 +286,55 @@ different version of D, it will always be A's version
that wins, because we fetch all dependencies of A before
fetching those from B or C.
+=== Fetching and listing dependencies only
+
+You can fetch all dependencies recursively without building anything,
+with the `make fetch-deps` command. It follows the same rules described
+in the section above.
+
+You can list all dependencies recursively, again without building
+anything, with the `make list-deps` command. It will obviously need
+to fetch all dependencies exactly like `make fetch-deps`. Once
+everything is fetched, it prints a sorted list of absolute paths to the
+dependencies.
+
+By default, `fetch-deps` and `list-deps` work on the `BUILD_DEPS`
+and `DEPS` lists only. To also fetch/list `TEST_DEPS`, `DOC_DEPS`,
+`REL_DEPS` and/or `SHELL_DEPS`, you have two possibilities:
+
+* You can use `make fetch-test-deps`, `make fetch-doc-deps`, `make
+ fetch-rel-deps` and `make fetch-shell-deps` commands respectively.
+ If you want to list them, you can use `make list-test-deps`, `make
+ list-doc-deps`, `make list-rel-deps` and `make list-shell-deps`
+ respectively.
+* You can use `make fetch-deps` or `make list-deps` with the Makefile
+ variable `DEP_TYPES` set to a list of dependency types you want.
+ The types are `test`, `doc`, `rel` and `shell` respectively. For
+ example, you can list test and doc dependencies with `make list-deps
+ DEP_TYPES='test doc'`.
+
+Note that only first level `TEST_DEPS`, `DOC_DEPS`, `REL_DEPS` and
+`SHELL_DEPS` are included, not dependencies' one. In other word,
+`make list-test-deps` lists the `TEST_DEPS` of your project, but not
+`TEST_DEPS` of the projects yours depend on.
+
+No matter which method you use, `BUILD_DEPS` and `DEPS` are always
+included.
+
+Internally, the `make fetch-*` commands store the complete list of
+dependencies in files named `$(ERLANG_MK_RECURSIVE_DEPS_LIST)`,
+`$(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST)`,
+`$(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST)`,
+`$(ERLANG_MK_RECURSIVE_REL_DEPS_LIST)` and
+`$(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST)`. Those files are simply printed
+by the `make list-*` commands.
+
+`make list-*` commands are made for human beings. If you need the list
+of dependencies in a Makefile or a script, you should use the content
+of those files directly instead. The reason is that `make fetch-*` and
+`make list-*` may have unwanted content in their output, such as actual
+fetching of dependencies.
+
=== Ignoring unwanted dependencies
Sometimes, you may want to ignore dependencies entirely.
diff --git a/docs/en/erlang.mk/1/guide/deps/index.html b/docs/en/erlang.mk/1/guide/deps/index.html
index 021c4574..cc8d737d 100644
--- a/docs/en/erlang.mk/1/guide/deps/index.html
+++ b/docs/en/erlang.mk/1/guide/deps/index.html
@@ -358,6 +358,60 @@ fetching those from B or C.</p></div>
</div>
</div>
<div class="sect1">
+<h2 id="_fetching_and_listing_dependencies_only">Fetching and listing dependencies only</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You can fetch all dependencies recursively without building anything,
+with the <code>make fetch-deps</code> command. It follows the same rules described
+in the section above.</p></div>
+<div class="paragraph"><p>You can list all dependencies recursively, again without building
+anything, with the <code>make list-deps</code> command. It will obviously need
+to fetch all dependencies exactly like <code>make fetch-deps</code>. Once
+everything is fetched, it prints a sorted list of absolute paths to the
+dependencies.</p></div>
+<div class="paragraph"><p>By default, <code>fetch-deps</code> and <code>list-deps</code> work on the <code>BUILD_DEPS</code>
+and <code>DEPS</code> lists only. To also fetch/list <code>TEST_DEPS</code>, <code>DOC_DEPS</code>,
+<code>REL_DEPS</code> and/or <code>SHELL_DEPS</code>, you have two possibilities:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+You can use <code>make fetch-test-deps</code>, <code>make fetch-doc-deps</code>, <code>make
+ fetch-rel-deps</code> and <code>make fetch-shell-deps</code> commands respectively.
+ If you want to list them, you can use <code>make list-test-deps</code>, <code>make
+ list-doc-deps</code>, <code>make list-rel-deps</code> and <code>make list-shell-deps</code>
+ respectively.
+</p>
+</li>
+<li>
+<p>
+You can use <code>make fetch-deps</code> or <code>make list-deps</code> with the Makefile
+ variable <code>DEP_TYPES</code> set to a list of dependency types you want.
+ The types are <code>test</code>, <code>doc</code>, <code>rel</code> and <code>shell</code> respectively. For
+ example, you can list test and doc dependencies with <code>make list-deps
+ DEP_TYPES='test doc'</code>.
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>Note that only first level &#8216;TEST_DEPS<code>, `DOC_DEPS</code>, <code>REL_DEPS</code> and
+<code>SHELL_DEPS</code> are included, not dependencies&#8217; one. In other word,
+<code>make list-test-deps</code> lists the <code>TEST_DEPS</code> of your project, but not
+<code>TEST_DEPS</code> of the projects yours depend on.</p></div>
+<div class="paragraph"><p>No matter which method you use, <code>BUILD_DEPS</code> and <code>DEPS</code> are always
+included.</p></div>
+<div class="paragraph"><p>Internally, the <code>make fetch-*</code> commands store the complete list of
+dependencies in files named <code>$(ERLANG_MK_RECURSIVE_DEPS_LIST)</code>,
+<code>$(ERLANG_MK_RECURSIVE_TEST_DEPS_LIST)</code>,
+<code>$(ERLANG_MK_RECURSIVE_DOC_DEPS_LIST)</code>,
+<code>$(ERLANG_MK_RECURSIVE_REL_DEPS_LIST)</code> and
+<code>$(ERLANG_MK_RECURSIVE_SHELL_DEPS_LIST)</code>. Those files are simply printed
+by the <code>make list-*</code> commands.</p></div>
+<div class="paragraph"><p><code>make list-*</code> commands are made for human beings. If you need the list
+of dependencies in a Makefile or a script, you should use the content
+of those files directly instead. The reason is that <code>make fetch-*</code> and
+<code>make list-*</code> may have unwanted content in their output, such as actual
+fetching of dependencies.</p></div>
+</div>
+</div>
+<div class="sect1">
<h2 id="_ignoring_unwanted_dependencies">Ignoring unwanted dependencies</h2>
<div class="sectionbody">
<div class="paragraph"><p>Sometimes, you may want to ignore dependencies entirely.
diff --git a/docs/en/erlang.mk/1/guide/escripts.asciidoc b/docs/en/erlang.mk/1/guide/escripts.asciidoc
index 3d68c77b..722dcc6f 100644
--- a/docs/en/erlang.mk/1/guide/escripts.asciidoc
+++ b/docs/en/erlang.mk/1/guide/escripts.asciidoc
@@ -1,6 +1,83 @@
[[escript]]
== Escripts
-// @todo Write it.
+Escripts are an alternative to release. They are meant to be
+used for small command line executables written in Erlang.
-Placeholder chapter.
+They are not self-contained, unlike xref:relx[releases].
+Erlang must be installed for them to run. This however means
+that they are fairly small compared to releases.
+
+For self-contained executables, check xref:sfx[self-extracting releases].
+
+=== Requirements
+
+Erlang.mk uses `p7zip` by default to generate the escript
+archive. Make sure it is installed. On most systems the
+package is named `p7zip`; on Ubuntu you need `p7zip-full`.
+
+If `p7zip` is unavailable, `zip` may be used by setting
+the `ESCRIPT_ZIP` variable. For example:
+
+[source,bash]
+$ make escript ESCRIPT_ZIP=zip
+
+=== Generating an escript
+
+Run the following command to generate an escript:
+
+[source,bash]
+$ make escript
+
+This will by default create an escript with the same name as
+the project, in the project's directory. If the project is
+called `relx` then the escript will be in `./relx`.
+
+You can run the escript as you would any executable:
+
+[source,bash]
+$ ./relx
+
+=== Configuration
+
+You can change the name of the escript by setting `ESCRIPT_NAME`.
+The name determines both the default output file name and the
+entry module containing the function `main/1`.
+
+`ESCRIPT_FILE` can be set if you need a different file name
+or location.
+
+The escript header can be entirely customized. The first line
+is the shebang, set by `ESCRIPT_SHEBANG`. The second line is
+a comment, set by `ESCRIPT_COMMENT`. The third line is the
+arguments the VM will use when running the escript, set by
+`ESCRIPT_EMU_ARGS`.
+
+Finally, `ESCRIPT_ZIP` can be set to customize the command used
+to create the zip file. Read on for more information.
+
+=== Extra files
+
+Generating an escript is a two-part process. First, a zip file
+is created with the contents of the escript. Then a header is
+added to this file to create the escript.
+
+It is possible to add commands that will be executed between
+the two steps. You can for example add extra files to the zip
+archive:
+
+[source,make]
+----
+escript-zip::
+ $(verbose) $(ESCRIPT_ZIP) $(ESCRIPT_ZIP_FILE) priv/templates/*
+----
+
+The `ESCRIPT_ZIP` variable contains the command to run to add
+files to the zip archive `ESCRIPT_ZIP_FILE`.
+
+=== Optimizing for size
+
+Erlang.mk will by default compile BEAM files with debug
+information. You may want to disable this behavior to obtain
+smaller escript files. Simply set `ERLC_OPTS` to a value that
+does not include `+debug_info`.
diff --git a/docs/en/erlang.mk/1/guide/escripts/index.html b/docs/en/erlang.mk/1/guide/escripts/index.html
index dec55786..f3ba738f 100644
--- a/docs/en/erlang.mk/1/guide/escripts/index.html
+++ b/docs/en/erlang.mk/1/guide/escripts/index.html
@@ -69,7 +69,91 @@
<h1 class="lined-header"><span>Escripts</span></h1>
-<div class="paragraph"><p>Placeholder chapter.</p></div>
+<div class="paragraph"><p>Escripts are an alternative to release. They are meant to be
+used for small command line executables written in Erlang.</p></div>
+<div class="paragraph"><p>They are not self-contained, unlike <a href="../relx">releases</a>.
+Erlang must be installed for them to run. This however means
+that they are fairly small compared to releases.</p></div>
+<div class="paragraph"><p>For self-contained executables, check <a href="../sfx">self-extracting releases</a>.</p></div>
+<div class="sect1">
+<h2 id="_requirements">Requirements</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk uses <code>p7zip</code> by default to generate the escript
+archive. Make sure it is installed. On most systems the
+package is named <code>p7zip</code>; on Ubuntu you need <code>p7zip-full</code>.</p></div>
+<div class="paragraph"><p>If <code>p7zip</code> is unavailable, <code>zip</code> may be used by setting
+the <code>ESCRIPT_ZIP</code> variable. For example:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make escript <span style="color: #009900">ESCRIPT_ZIP</span><span style="color: #990000">=</span>zip</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_generating_an_escript">Generating an escript</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Run the following command to generate an escript:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make escript</tt></pre></div></div>
+<div class="paragraph"><p>This will by default create an escript with the same name as
+the project, in the project&#8217;s directory. If the project is
+called <code>relx</code> then the escript will be in <code>./relx</code>.</p></div>
+<div class="paragraph"><p>You can run the escript as you would any executable:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ <span style="color: #990000">.</span>/relx</tt></pre></div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_configuration">Configuration</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>You can change the name of the escript by setting <code>ESCRIPT_NAME</code>.
+The name determines both the default output file name and the
+entry module containing the function <code>main/1</code>.</p></div>
+<div class="paragraph"><p><code>ESCRIPT_FILE</code> can be set if you need a different file name
+or location.</p></div>
+<div class="paragraph"><p>The escript header can be entirely customized. The first line
+is the shebang, set by <code>ESCRIPT_SHEBANG</code>. The second line is
+a comment, set by <code>ESCRIPT_COMMENT</code>. The third line is the
+arguments the VM will use when running the escript, set by
+<code>ESCRIPT_EMU_ARGS</code>.</p></div>
+<div class="paragraph"><p>Finally, <code>ESCRIPT_ZIP</code> can be set to customize the command used
+to create the zip file. Read on for more information.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_extra_files">Extra files</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Generating an escript is a two-part process. First, a zip file
+is created with the contents of the escript. Then a header is
+added to this file to create the escript.</p></div>
+<div class="paragraph"><p>It is possible to add commands that will be executed between
+the two steps. You can for example add extra files to the zip
+archive:</p></div>
+<div class="listingblock">
+<div class="content"></div></div>
+<div class="paragraph"><p>The <code>ESCRIPT_ZIP</code> variable contains the command to run to add
+files to the zip archive <code>ESCRIPT_ZIP_FILE</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_optimizing_for_size">Optimizing for size</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk will by default compile BEAM files with debug
+information. You may want to disable this behavior to obtain
+smaller escript files. Simply set <code>ERLC_OPTS</code> to a value that
+does not include <code>+debug_info</code>.</p></div>
+</div>
+</div>
@@ -79,8 +163,8 @@
<nav style="margin:1em 0">
- <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/releases/">
- Releases
+ <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/sfx/">
+ Self-extracting releases
</a>
diff --git a/docs/en/erlang.mk/1/guide/external_plugins_list.asciidoc b/docs/en/erlang.mk/1/guide/external_plugins_list.asciidoc
index 317355e6..a194f45d 100644
--- a/docs/en/erlang.mk/1/guide/external_plugins_list.asciidoc
+++ b/docs/en/erlang.mk/1/guide/external_plugins_list.asciidoc
@@ -28,8 +28,13 @@ as an Erlang.mk plugin.
=== hexer.mk
-An https://github.com/inaka/hexer.mk[Hex plugin] for Erlang.mk.
-Hex is a https://hex.pm/[package manager for the Elixir ecosystem].
+An https://github.com/inaka/hexer.mk[Hex plugin] for Erlang.mk
+using the `hexer` tool.
+
+=== hexpm.mk
+
+Another https://github.com/botsunit/hexpm.mk[Hex plugin] for
+Erlang.mk, with support for Hex dependency operators.
=== jorel
diff --git a/docs/en/erlang.mk/1/guide/external_plugins_list/index.html b/docs/en/erlang.mk/1/guide/external_plugins_list/index.html
index 803e63b5..9b26460d 100644
--- a/docs/en/erlang.mk/1/guide/external_plugins_list/index.html
+++ b/docs/en/erlang.mk/1/guide/external_plugins_list/index.html
@@ -104,8 +104,15 @@ as an Erlang.mk plugin.</p></div>
<div class="sect1">
<h2 id="_hexer_mk">hexer.mk</h2>
<div class="sectionbody">
-<div class="paragraph"><p>An <a href="https://github.com/inaka/hexer.mk">Hex plugin</a> for Erlang.mk.
-Hex is a <a href="https://hex.pm/">package manager for the Elixir ecosystem</a>.</p></div>
+<div class="paragraph"><p>An <a href="https://github.com/inaka/hexer.mk">Hex plugin</a> for Erlang.mk
+using the <code>hexer</code> tool.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_hexpm_mk">hexpm.mk</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Another <a href="https://github.com/botsunit/hexpm.mk">Hex plugin</a> for
+Erlang.mk, with support for Hex dependency operators.</p></div>
</div>
</div>
<div class="sect1">
diff --git a/docs/en/erlang.mk/1/guide/getting_started.asciidoc b/docs/en/erlang.mk/1/guide/getting_started.asciidoc
index 3a7c0d10..ca1391d6 100644
--- a/docs/en/erlang.mk/1/guide/getting_started.asciidoc
+++ b/docs/en/erlang.mk/1/guide/getting_started.asciidoc
@@ -32,7 +32,7 @@ $ wget https://erlang.mk/erlang.mk
Or:
[source,bash]
-$ curl https://erlang.mk/erlang.mk -o erlang.mk
+$ curl -O https://erlang.mk/erlang.mk
Alternatively, just https://erlang.mk/erlang.mk[click on this link].
@@ -290,7 +290,7 @@ you can always run `make help`:
----
$ make help
erlang.mk (version 1.2.0-642-gccd2b9f) is distributed under the terms of the ISC License.
-Copyright (c) 2013-2015 Loïc Hoguin <[email protected]>
+Copyright (c) 2013-2016 Loïc Hoguin <[email protected]>
Usage: [V=1] make [target]...
diff --git a/docs/en/erlang.mk/1/guide/getting_started/index.html b/docs/en/erlang.mk/1/guide/getting_started/index.html
index 0504e949..10bc1ab3 100644
--- a/docs/en/erlang.mk/1/guide/getting_started/index.html
+++ b/docs/en/erlang.mk/1/guide/getting_started/index.html
@@ -108,7 +108,7 @@ http://www.gnu.org/software/src-highlite -->
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-<pre><tt>$ curl https<span style="color: #990000">:</span>//erlang<span style="color: #990000">.</span>mk/erlang<span style="color: #990000">.</span>mk -o erlang<span style="color: #990000">.</span>mk</tt></pre></div></div>
+<pre><tt>$ curl -O https<span style="color: #990000">:</span>//erlang<span style="color: #990000">.</span>mk/erlang<span style="color: #990000">.</span>mk</tt></pre></div></div>
<div class="paragraph"><p>Alternatively, just <a href="https://erlang.mk/erlang.mk">click on this link</a>.</p></div>
<div class="paragraph"><p>Make sure you put the file inside the folder we created previously.</p></div>
</div>
@@ -388,7 +388,7 @@ http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>$ make <span style="font-weight: bold"><span style="color: #0000FF">help</span></span>
erlang<span style="color: #990000">.</span>mk <span style="color: #990000">(</span>version <span style="color: #993399">1.2</span><span style="color: #990000">.</span><span style="color: #993399">0</span>-<span style="color: #993399">642</span>-gccd2b9f<span style="color: #990000">)</span> is distributed under the terms of the ISC License<span style="color: #990000">.</span>
-Copyright <span style="color: #990000">(</span>c<span style="color: #990000">)</span> <span style="color: #993399">2013</span>-<span style="color: #993399">2015</span> Loïc Hoguin <span style="color: #990000">&lt;</span>essen@ninenines<span style="color: #990000">.</span>eu<span style="color: #990000">&gt;</span>
+Copyright <span style="color: #990000">(</span>c<span style="color: #990000">)</span> <span style="color: #993399">2013</span>-<span style="color: #993399">2016</span> Loïc Hoguin <span style="color: #990000">&lt;</span>essen@ninenines<span style="color: #990000">.</span>eu<span style="color: #990000">&gt;</span>
Usage<span style="color: #990000">:</span> <span style="color: #990000">[</span><span style="color: #009900">V</span><span style="color: #990000">=</span><span style="color: #993399">1</span><span style="color: #990000">]</span> make <span style="color: #990000">[</span>target<span style="color: #990000">]...</span>
diff --git a/docs/en/erlang.mk/1/guide/index.html b/docs/en/erlang.mk/1/guide/index.html
index 66b34a72..dd2d6927 100644
--- a/docs/en/erlang.mk/1/guide/index.html
+++ b/docs/en/erlang.mk/1/guide/index.html
@@ -122,6 +122,11 @@
</li>
<li>
<p>
+<a href="sfx/">Self-extracting releases</a>
+</p>
+</li>
+<li>
+<p>
<a href="escripts/">Escripts</a>
</p>
</li>
diff --git a/docs/en/erlang.mk/1/guide/installation.asciidoc b/docs/en/erlang.mk/1/guide/installation.asciidoc
index cc18e7f1..f3a52cf4 100644
--- a/docs/en/erlang.mk/1/guide/installation.asciidoc
+++ b/docs/en/erlang.mk/1/guide/installation.asciidoc
@@ -1,24 +1,57 @@
[[installation]]
== Installation
-This chapter explains how to setup your system in
-order to use Erlang.mk.
-
=== On Unix
-Erlang.mk requires GNU Make to be installed. GNU Make 3.81
-or later is required. GNU Make 4.1 or later is recommended,
-as this is the version Erlang.mk is developed on.
+Erlang.mk requires GNU Make to be installed. While it will
+currently work with GNU Make 3.81, support for this version
+is deprecated and will be removed in 2017. We recommend
+GNU Make 4.1 or later.
+
+Git and Erlang/OTP must also be installed.
Some functionality requires that Autoconf 2.59 or later be
installed, in order to compile Erlang/OTP. Erlang/OTP may
have further requirements depending on your needs.
-Erlang.mk currently requires Erlang/OTP to be installed in
-order to compile Erlang projects.
-
Some packages may require additional libraries.
+==== Linux
+
+The commands to install packages vary between distributions:
+
+.Arch Linux
+[source,bash]
+$ pacman -Sy erlang git make
+
+==== FreeBSD
+
+FreeBSD comes with binary and source packages:
+
+.Install binary packages
+[source,bash]
+$ pkg install erlang git gmake
+
+On FreeBSD the `make` command is BSD Make. Use `gmake` instead.
+
+==== OS X and macOS
+
+While Apple distributes their own GNU Make, their version is
+very old and plagued with numerous bugs. It is recommended
+to install a more recent version from either Homebrew or
+MacPorts:
+
+.Homebrew
+[source,bash]
+$ brew install erlang git homebrew/dupes/make
+
+Homebrew installs GNU Make as `gmake`. The `make` command
+is the one provided by Apple.
+
+.MacPorts
+[source,bash]
+$ sudo port install erlang git gmake
+
=== On Windows
Erlang.mk can be used on Windows inside an MSYS2 environment.
diff --git a/docs/en/erlang.mk/1/guide/installation/index.html b/docs/en/erlang.mk/1/guide/installation/index.html
index 7e4ebfb8..2d711d0f 100644
--- a/docs/en/erlang.mk/1/guide/installation/index.html
+++ b/docs/en/erlang.mk/1/guide/installation/index.html
@@ -69,20 +69,64 @@
<h1 class="lined-header"><span>Installation</span></h1>
-<div class="paragraph"><p>This chapter explains how to setup your system in
-order to use Erlang.mk.</p></div>
<div class="sect1">
<h2 id="_on_unix">On Unix</h2>
<div class="sectionbody">
-<div class="paragraph"><p>Erlang.mk requires GNU Make to be installed. GNU Make 3.81
-or later is required. GNU Make 4.1 or later is recommended,
-as this is the version Erlang.mk is developed on.</p></div>
+<div class="paragraph"><p>Erlang.mk requires GNU Make to be installed. While it will
+currently work with GNU Make 3.81, support for this version
+is deprecated and will be removed in 2017. We recommend
+GNU Make 4.1 or later.</p></div>
+<div class="paragraph"><p>Git and Erlang/OTP must also be installed.</p></div>
<div class="paragraph"><p>Some functionality requires that Autoconf 2.59 or later be
installed, in order to compile Erlang/OTP. Erlang/OTP may
have further requirements depending on your needs.</p></div>
-<div class="paragraph"><p>Erlang.mk currently requires Erlang/OTP to be installed in
-order to compile Erlang projects.</p></div>
<div class="paragraph"><p>Some packages may require additional libraries.</p></div>
+<div class="sect3">
+<h4 id="_linux">Linux</h4>
+<div class="paragraph"><p>The commands to install packages vary between distributions:</p></div>
+<div class="listingblock">
+<div class="title">Arch Linux</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ pacman -Sy erlang git make</tt></pre></div></div>
+</div>
+<div class="sect3">
+<h4 id="_freebsd">FreeBSD</h4>
+<div class="paragraph"><p>FreeBSD comes with binary and source packages:</p></div>
+<div class="listingblock">
+<div class="title">Install binary packages</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ pkg install erlang git gmake</tt></pre></div></div>
+<div class="paragraph"><p>On FreeBSD the <code>make</code> command is BSD Make. Use <code>gmake</code> instead.</p></div>
+</div>
+<div class="sect3">
+<h4 id="_os_x_and_macos">OS X and macOS</h4>
+<div class="paragraph"><p>While Apple distributes their own GNU Make, their version is
+very old and plagued with numerous bugs. It is recommended
+to install a more recent version from either Homebrew or
+MacPorts:</p></div>
+<div class="listingblock">
+<div class="title">Homebrew</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ brew install erlang git homebrew/dupes/make</tt></pre></div></div>
+<div class="paragraph"><p>Homebrew installs GNU Make as <code>gmake</code>. The <code>make</code> command
+is the one provided by Apple.</p></div>
+<div class="listingblock">
+<div class="title">MacPorts</div>
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ sudo port install erlang git gmake</tt></pre></div></div>
+</div>
</div>
</div>
<div class="sect1">
diff --git a/docs/en/erlang.mk/1/guide/releases.asciidoc b/docs/en/erlang.mk/1/guide/releases.asciidoc
index 46183e63..67abe879 100644
--- a/docs/en/erlang.mk/1/guide/releases.asciidoc
+++ b/docs/en/erlang.mk/1/guide/releases.asciidoc
@@ -17,12 +17,11 @@ RELX_CONFIG = $(CURDIR)/webchat.config
Relx does not need to be installed. Erlang.mk will download
and build it automatically.
-// @todo We are going to fetch relx from repository in the future.
The Relx executable will be saved in the '$(RELX)' file. This
location defaults to '$(CURDIR)/relx' and can be overriden.
-// @todo You can use a custom repository by ???
+// @todo You can use a custom location by ???
=== Configuration
@@ -56,6 +55,10 @@ the `rel` target can be used:
[source,bash]
$ make rel
+Erlang.mk always generates a tarball alongside the release,
+which can be directly uploaded to a server. The tarball is
+located at `$(RELX_OUTPUT_DIR)/<name>/<name>-<vsn>.tar.gz`.
+
=== Running the release
Erlang.mk provides a convenience function for running the
@@ -68,3 +71,50 @@ This command will also build the project and generate the
release if they weren't already. It starts the release in
_console mode_, meaning you will also have a shell ready to
use to check things as needed.
+
+=== Upgrading a release
+
+Erlang.mk provides a `relup` target for generating release
+upgrades. Release upgrades allow updating the code and the
+state of a running release without restarting it.
+
+Once your changes are done, you need to update the version
+of the application(s) that will be updated. You also need
+to update the version of the release.
+
+For each application that needs to be updated, an
+http://erlang.org/doc/man/appup.html[appup file]
+must be written. Refer to the Erlang/OTP documentation
+for more details.
+
+For the purpose of this section, assume the initial release
+version was `1`, and the new version is `2`. The name of the
+release will be `example`.
+
+Once all this is done, you can build the tarball for the
+release upgrade:
+
+[source,bash]
+$ make relup
+
+This will create an archive at the root directory of the
+release, `$RELX_OUTPUT_DIR/example/example-2.tar.gz`.
+
+Move the archive to the correct location on the running
+node. From the release's root directory:
+
+[source,bash]
+$ mkdir releases/2/
+$ mv path/to/example-2.tar.gz releases/2/
+
+Finally, upgrade the release:
+
+[source,bash]
+$ bin/example_release upgrade "2/example_release"
+
+Or on Windows:
+
+[source,bash]
+$ bin/example_release.cmd upgrade "2/example_release"
+
+Your release was upgraded!
diff --git a/docs/en/erlang.mk/1/guide/releases/index.html b/docs/en/erlang.mk/1/guide/releases/index.html
index bf102a3c..fc98819e 100644
--- a/docs/en/erlang.mk/1/guide/releases/index.html
+++ b/docs/en/erlang.mk/1/guide/releases/index.html
@@ -123,6 +123,9 @@ by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>$ make rel</tt></pre></div></div>
+<div class="paragraph"><p>Erlang.mk always generates a tarball alongside the release,
+which can be directly uploaded to a server. The tarball is
+located at <code>$(RELX_OUTPUT_DIR)/&lt;name&gt;/&lt;name&gt;-&lt;vsn&gt;.tar.gz</code>.</p></div>
</div>
</div>
<div class="sect1">
@@ -142,6 +145,58 @@ release if they weren&#8217;t already. It starts the release in
use to check things as needed.</p></div>
</div>
</div>
+<div class="sect1">
+<h2 id="_upgrading_a_release">Upgrading a release</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Erlang.mk provides a <code>relup</code> target for generating release
+upgrades. Release upgrades allow updating the code and the
+state of a running release without restarting it.</p></div>
+<div class="paragraph"><p>Once your changes are done, you need to update the version
+of the application(s) that will be updated. You also need
+to update the version of the release.</p></div>
+<div class="paragraph"><p>For each application that needs to be updated, an
+<a href="http://erlang.org/doc/man/appup.html">appup file</a>
+must be written. Refer to the Erlang/OTP documentation
+for more details.</p></div>
+<div class="paragraph"><p>For the purpose of this section, assume the initial release
+version was <code>1</code>, and the new version is <code>2</code>. The name of the
+release will be <code>example</code>.</p></div>
+<div class="paragraph"><p>Once all this is done, you can build the tarball for the
+release upgrade:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make relup</tt></pre></div></div>
+<div class="paragraph"><p>This will create an archive at the root directory of the
+release, <code>$RELX_OUTPUT_DIR/example/example-2.tar.gz</code>.</p></div>
+<div class="paragraph"><p>Move the archive to the correct location on the running
+node. From the release&#8217;s root directory:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ mkdir releases<span style="color: #990000">/</span><span style="color: #993399">2</span><span style="color: #990000">/</span>
+$ mv path/to/example-<span style="color: #993399">2</span><span style="color: #990000">.</span>tar<span style="color: #990000">.</span>gz releases<span style="color: #990000">/</span><span style="color: #993399">2</span><span style="color: #990000">/</span></tt></pre></div></div>
+<div class="paragraph"><p>Finally, upgrade the release:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ bin/example_release upgrade <span style="color: #FF0000">"2/example_release"</span></tt></pre></div></div>
+<div class="paragraph"><p>Or on Windows:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ bin/example_release<span style="color: #990000">.</span>cmd upgrade <span style="color: #FF0000">"2/example_release"</span></tt></pre></div></div>
+<div class="paragraph"><p>Your release was upgraded!</p></div>
+</div>
+</div>
@@ -157,8 +212,8 @@ use to check things as needed.</p></div>
- <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/escripts/">
- Escripts
+ <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/sfx/">
+ Self-extracting releases
</a>
</nav>
diff --git a/docs/en/erlang.mk/1/guide/sfx.asciidoc b/docs/en/erlang.mk/1/guide/sfx.asciidoc
new file mode 100644
index 00000000..aae2c8d4
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/sfx.asciidoc
@@ -0,0 +1,49 @@
+[[sfx]]
+== Self-extracting releases
+
+Erlang.mk allows you to package xref:relx[Relx releases] as
+self-extracting archives. These archives contain all the
+files in the release and come in the form of a script that
+will extract and run the release automatically.
+
+This allows you to package the release as a single file
+that can then be executed.
+
+This feature is currently experimental. Feedback is much
+appreciated.
+
+=== Generating the self-extracting archive
+
+To generate a self-extracting release, all you need to do
+is pass the `SFX=1` variable to Make when you build the
+release:
+
+[source,bash]
+$ make SFX=1
+
+This will create a self-extracting archive in
+`$RELX_OUTPUT_DIR/<name>.run`. For example if the release
+is named `hello_world` and `$RELX_OUTPUT_DIR` is the default,
+the file will be located at `_rel/hello_world.run`.
+
+=== Running the release
+
+Simply execute the script to get started:
+
+[source,bash]
+----
+$ ./_rel/hello_world.run
+Exec: /tmp/tmp.3eeEq7E1ta/erts-8.1/bin/erlexec ...
+Root: /tmp/tmp.3eeEq7E1ta
+/tmp/tmp.3eeEq7E1ta
+Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:4:4] ...
+
+Eshell V8.1 (abort with ^G)
+(hello_world@localhost)1>
+----
+
+As you can see the archive is extracted to a temporary
+directory before the release can be started.
+
+The self-extracting script currently only supports starting
+the release in `console` mode.
diff --git a/docs/en/erlang.mk/1/guide/sfx/index.html b/docs/en/erlang.mk/1/guide/sfx/index.html
new file mode 100644
index 00000000..8433ab9c
--- /dev/null
+++ b/docs/en/erlang.mk/1/guide/sfx/index.html
@@ -0,0 +1,206 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="Loïc Hoguin based on a design from (Soft10) Pol Cámara">
+
+ <meta name="generator" content="Hugo 0.16" />
+
+ <title>Nine Nines: Self-extracting releases</title>
+
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic' rel='stylesheet' type='text/css'>
+
+ <link href="/css/bootstrap.min.css" rel="stylesheet">
+ <link href="/css/99s.css" rel="stylesheet">
+
+ <link rel="shortcut icon" href="/img/ico/favicon.ico">
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/ico/apple-touch-icon-114.png">
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/ico/apple-touch-icon-72.png">
+ <link rel="apple-touch-icon-precomposed" href="/img/ico/apple-touch-icon-57.png">
+
+
+</head>
+
+
+<body class="">
+ <header id="page-head">
+ <div id="topbar" class="container">
+ <div class="row">
+ <div class="span2">
+ <h1 id="logo"><a href="/" title="99s">99s</a></h1>
+ </div>
+ <div class="span10">
+
+ <div id="side-header">
+ <nav>
+ <ul>
+ <li><a title="Hear my thoughts" href="/articles">Articles</a></li>
+ <li><a title="Watch my talks" href="/talks">Talks</a></li>
+ <li class="active"><a title="Read the docs" href="/docs">Documentation</a></li>
+ <li><a title="Request my services" href="/services">Consulting & Training</a></li>
+ </ul>
+ </nav>
+ <ul id="social">
+ <li>
+ <a href="https://github.com/ninenines" title="Check my Github repositories"><img src="/img/ico_github.png" data-hover="/img/ico_github_alt.png" alt="Github"></a>
+ </li>
+ <li>
+ <a title="Keep in touch!" href="http://twitter.com/lhoguin"><img src="/img/ico_microblog.png" data-hover="/img/ico_microblog_alt.png"></a>
+ </li>
+ <li>
+ <a title="Contact me" href="mailto:[email protected]"><img src="/img/ico_mail.png" data-hover="/img/ico_mail_alt.png"></a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+
+</header>
+
+<div id="contents" class="two_col">
+<div class="container">
+<div class="row">
+<div id="docs" class="span9 maincol">
+
+<h1 class="lined-header"><span>Self-extracting releases</span></h1>
+
+<div class="paragraph"><p>Erlang.mk allows you to package <a href="../relx">Relx releases</a> as
+self-extracting archives. These archives contain all the
+files in the release and come in the form of a script that
+will extract and run the release automatically.</p></div>
+<div class="paragraph"><p>This allows you to package the release as a single file
+that can then be executed.</p></div>
+<div class="paragraph"><p>This feature is currently experimental. Feedback is much
+appreciated.</p></div>
+<div class="sect1">
+<h2 id="_generating_the_self_extracting_archive">Generating the self-extracting archive</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>To generate a self-extracting release, all you need to do
+is pass the <code>SFX=1</code> variable to Make when you build the
+release:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ make <span style="color: #009900">SFX</span><span style="color: #990000">=</span><span style="color: #993399">1</span></tt></pre></div></div>
+<div class="paragraph"><p>This will create a self-extracting archive in
+<code>$RELX_OUTPUT_DIR/&lt;name&gt;.run</code>. For example if the release
+is named <code>hello_world</code> and <code>$RELX_OUTPUT_DIR</code> is the default,
+the file will be located at <code>_rel/hello_world.run</code>.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_running_the_release">Running the release</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Simply execute the script to get started:</p></div>
+<div class="listingblock">
+<div class="content"><!-- Generator: GNU source-highlight 3.1.8
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre><tt>$ <span style="color: #990000">./</span>_rel/hello_world<span style="color: #990000">.</span>run
+Exec<span style="color: #990000">:</span> /tmp/tmp<span style="color: #990000">.</span>3eeEq7E1ta/erts-<span style="color: #993399">8.1</span>/bin/erlexec <span style="color: #990000">...</span>
+Root<span style="color: #990000">:</span> /tmp/tmp<span style="color: #990000">.</span>3eeEq7E1ta
+/tmp/tmp<span style="color: #990000">.</span>3eeEq7E1ta
+Erlang/OTP <span style="color: #993399">19</span> <span style="color: #990000">[</span>erts-<span style="color: #993399">8.1</span><span style="color: #990000">]</span> <span style="color: #990000">[</span><span style="font-weight: bold"><span style="color: #0000FF">source</span></span><span style="color: #990000">]</span> <span style="color: #990000">[</span><span style="color: #993399">64</span>-bit<span style="color: #990000">]</span> <span style="color: #990000">[</span>smp<span style="color: #990000">:</span><span style="color: #993399">4</span><span style="color: #990000">:</span><span style="color: #993399">4</span><span style="color: #990000">]</span> <span style="color: #990000">...</span>
+
+Eshell V8<span style="color: #990000">.</span><span style="color: #993399">1</span> <span style="color: #990000">(</span>abort with <span style="color: #990000">^</span>G<span style="color: #990000">)</span>
+<span style="color: #990000">(</span>hello_world@localhost<span style="color: #990000">)</span><span style="color: #993399">1</span><span style="color: #990000">&gt;</span></tt></pre></div></div>
+<div class="paragraph"><p>As you can see the archive is extracted to a temporary
+directory before the release can be started.</p></div>
+<div class="paragraph"><p>The self-extracting script currently only supports starting
+the release in <code>console</code> mode.</p></div>
+</div>
+</div>
+
+
+
+
+
+
+
+ <nav style="margin:1em 0">
+
+ <a style="float:left" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/releases/">
+ Releases
+ </a>
+
+
+
+ <a style="float:right" href="https://ninenines.eu/docs/en/erlang.mk/1/guide/escripts/">
+ Escripts
+ </a>
+
+ </nav>
+
+
+
+
+</div>
+
+<div class="span3 sidecol">
+
+
+<h3>
+ Erlang.mk
+ 1
+
+ User Guide
+</h3>
+
+<ul>
+
+
+
+</ul>
+
+<h4 id="docs-nav">Navigation</h4>
+
+<h4>Version select</h4>
+<ul>
+
+
+
+ <li><a href="/docs/en/erlang.mk/1/guide">1</a></li>
+
+</ul>
+
+</div>
+</div>
+</div>
+</div>
+
+ <footer>
+ <div class="container">
+ <div class="row">
+ <div class="span6">
+ <p id="scroll-top"><a href="#">↑ Scroll to top</a></p>
+ <nav>
+ <ul>
+ <li><a href="mailto:[email protected]" title="Contact us">Contact us</a></li><li><a href="https://github.com/ninenines/ninenines.github.io" title="Github repository">Contribute to this site</a></li>
+ </ul>
+ </nav>
+ </div>
+ <div class="span6 credits">
+ <p><img src="/img/footer_logo.png"></p>
+ <p>Copyright &copy; Loïc Hoguin 2012-2016</p>
+ </div>
+ </div>
+ </div>
+ </footer>
+
+
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <script src="/js/bootstrap-carousel.js"></script>
+ <script src="/js/bootstrap-dropdown.js"></script>
+ <script src="/js/custom.js"></script>
+ </body>
+</html>
+
+
diff --git a/docs/en/ranch/1.2/manual/ranch_ssl/index.html b/docs/en/ranch/1.2/manual/ranch_ssl/index.html
index 4d358da7..b486f5ed 100644
--- a/docs/en/ranch/1.2/manual/ranch_ssl/index.html
+++ b/docs/en/ranch/1.2/manual/ranch_ssl/index.html
@@ -92,6 +92,7 @@ by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><span style="font-weight: bold"><span style="color: #000000">ssl_opt</span></span>() <span style="color: #990000">=</span> {<span style="color: #FF6600">alpn_preferred_protocols</span>, [<span style="font-weight: bold"><span style="color: #000080">binary</span></span>()]}
+ | {<span style="color: #FF6600">beast_mitigation</span>, <span style="color: #FF6600">one_n_minus_one</span> | <span style="color: #FF6600">zero_n</span> | <span style="color: #FF6600">disabled</span>}
| {<span style="color: #FF6600">cacertfile</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
| {<span style="color: #FF6600">cacerts</span>, [<span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()]}
| {<span style="color: #FF6600">cert</span>, <span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()}
@@ -110,6 +111,7 @@ http://www.gnu.org/software/src-highlite -->
| {<span style="color: #FF6600">keyfile</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
| {<span style="color: #FF6600">log_alert</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
| {<span style="color: #FF6600">next_protocols_advertised</span>, [<span style="font-weight: bold"><span style="color: #000080">binary</span></span>()]}
+ | {<span style="color: #FF6600">padding_check</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
| {<span style="color: #FF6600">partial_chain</span>, <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>(([<span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()]) <span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">trusted_ca</span>, <span style="font-weight: bold"><span style="color: #000000">public_key:der_encoded</span></span>()} | <span style="color: #FF6600">unknown_ca</span>)}
| {<span style="color: #FF6600">password</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
| {<span style="color: #FF6600">psk_identity</span>, <span style="font-weight: bold"><span style="color: #000000">string</span></span>()}
@@ -120,6 +122,7 @@ http://www.gnu.org/software/src-highlite -->
| {<span style="color: #FF6600">sni_fun</span>, <span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>()}
| {<span style="color: #FF6600">sni_hosts</span>, [{<span style="font-weight: bold"><span style="color: #000000">string</span></span>(), <span style="font-weight: bold"><span style="color: #000000">ssl_opt</span></span>()}]}
| {<span style="color: #FF6600">user_lookup_fun</span>, {<span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>(), <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}}
+ | {<span style="color: #FF6600">v2_hello_compatible</span>, <span style="font-weight: bold"><span style="color: #000000">boolean</span></span>()}
| {<span style="color: #FF6600">verify</span>, <span style="font-weight: bold"><span style="color: #000000">ssl:verify_type</span></span>()}
| {<span style="color: #FF6600">verify_fun</span>, {<span style="font-weight: bold"><span style="color: #0000FF">fun</span></span>(), <span style="font-weight: bold"><span style="color: #000000">any</span></span>()}}
| {<span style="color: #FF6600">versions</span>, [<span style="font-weight: bold"><span style="color: #000080">atom</span></span>()]}<span style="color: #990000">.</span></tt></pre></div></div>
@@ -151,6 +154,14 @@ alpn_preferred_protocols
</p>
</dd>
<dt class="hdlist1">
+beast_mitigation
+</dt>
+<dd>
+<p>
+ Change the BEAST mitigation strategy for SSL-3.0 and TLS-1.0 to interoperate with legacy software.
+</p>
+</dd>
+<dt class="hdlist1">
cacertfile
</dt>
<dd>
@@ -303,6 +314,14 @@ nodelay (true)
</p>
</dd>
<dt class="hdlist1">
+padding_check
+</dt>
+<dd>
+<p>
+ Allow disabling the block cipher padding check for TLS-1.0 to be able to interoperate with legacy software.
+</p>
+</dd>
+<dt class="hdlist1">
partial_chain
</dt>
<dd>
@@ -383,6 +402,14 @@ user_lookup_fun
</p>
</dd>
<dt class="hdlist1">
+v2_hello_compatible
+</dt>
+<dd>
+<p>
+ Accept clients that send hello messages in SSL-2.0 format while offering supported SSL/TLS versions.
+</p>
+</dd>
+<dt class="hdlist1">
verify (verify_none)
</dt>
<dd>
diff --git a/docs/index.xml b/docs/index.xml
index c28a3425..b4a331ed 100644
--- a/docs/index.xml
+++ b/docs/index.xml
@@ -52,6 +52,61 @@
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
+&lt;a href=&#34;cowboy_req.header&#34;&gt;cowboy_req:header(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_req.headers&#34;&gt;cowboy_req:headers(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_req.host&#34;&gt;cowboy_req:host(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_req.method&#34;&gt;cowboy_req:method(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_req.path&#34;&gt;cowboy_req:path(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_req.peer&#34;&gt;cowboy_req:peer(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_req.port&#34;&gt;cowboy_req:port(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_req.qs&#34;&gt;cowboy_req:qs(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_req.scheme&#34;&gt;cowboy_req:scheme(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_req.uri&#34;&gt;cowboy_req:uri(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
+&lt;a href=&#34;cowboy_req.version&#34;&gt;cowboy_req:version(3)&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
&lt;a href=&#34;cowboy_rest&#34;&gt;cowboy_rest(3)&lt;/a&gt;
&lt;/p&gt;
&lt;/li&gt;
@@ -374,6 +429,11 @@
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
+&lt;a href=&#34;sfx/&#34;&gt;Self-extracting releases&lt;/a&gt;
+&lt;/p&gt;
+&lt;/li&gt;
+&lt;li&gt;
+&lt;p&gt;
&lt;a href=&#34;escripts/&#34;&gt;Escripts&lt;/a&gt;
&lt;/p&gt;
&lt;/li&gt;
@@ -1126,10 +1186,10 @@ http://www.gnu.org/software/src-highlite --&gt;
| {&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Constraints&lt;/span&gt;}
| {&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Constraints&lt;/span&gt;, &lt;span style=&#34;color: #009900&#34;&gt;Default&lt;/span&gt;}]
-&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;atom&lt;/span&gt;&lt;/span&gt;()
+&lt;span style=&#34;color: #009900&#34;&gt;Name&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000080&#34;&gt;atom&lt;/span&gt;&lt;/span&gt;()
&lt;span style=&#34;color: #009900&#34;&gt;Constraints&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;color: #009900&#34;&gt;Constraint&lt;/span&gt; | [&lt;span style=&#34;color: #009900&#34;&gt;Constraint&lt;/span&gt;]
-&lt;span style=&#34;color: #009900&#34;&gt;Constraint&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_constraints:constraint&lt;/span&gt;&lt;/span&gt;()
-&lt;span style=&#34;color: #009900&#34;&gt;Default&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;any&lt;/span&gt;&lt;/span&gt;()&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
+&lt;span style=&#34;color: #009900&#34;&gt;Constraint&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;cowboy_constraints:constraint&lt;/span&gt;&lt;/span&gt;()
+&lt;span style=&#34;color: #009900&#34;&gt;Default&lt;/span&gt; &lt;span style=&#34;color: #990000&#34;&gt;::&lt;/span&gt; &lt;span style=&#34;font-weight: bold&#34;&gt;&lt;span style=&#34;color: #000000&#34;&gt;any&lt;/span&gt;&lt;/span&gt;()&lt;/tt&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;Fields description for match operations.&lt;/p&gt;&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;This type is used in &lt;a href=&#34;../cowboy_router&#34;&gt;cowboy_router(3)&lt;/a&gt;
for matching bindings and in the match functions found in
@@ -1439,9 +1499,9 @@ Value
&lt;p&gt;
The new value.
&lt;/p&gt;
+&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The type of the value differs depending on the key.&lt;/p&gt;&lt;/div&gt;
&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
-&lt;div class=&#34;paragraph&#34;&gt;&lt;p&gt;The type of the value differs depending on the key.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
diff --git a/donate/index.html b/donate/index.html
index 080cf380..c66d8fdc 100644
--- a/donate/index.html
+++ b/donate/index.html
@@ -354,6 +354,30 @@ work on open source software including Cowboy and Erlang.mk.</p></div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
</div>
</div>
</div>
diff --git a/index.html b/index.html
index c16e0898..5a02a585 100644
--- a/index.html
+++ b/index.html
@@ -494,6 +494,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
</div>
</div>
diff --git a/services/index.html b/services/index.html
index 1228b964..4d596ed9 100644
--- a/services/index.html
+++ b/services/index.html
@@ -439,6 +439,30 @@ work on open source software including Cowboy and Erlang.mk.</p></div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
</div>
</div>
</div>
diff --git a/sitemap.xml b/sitemap.xml
index ca0d8506..62618969 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -207,6 +207,50 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.header/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.headers/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.host/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.method/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.path/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.peer/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.port/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.qs/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.scheme/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.uri/</loc>
+ </url>
+
+ <url>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_req.version/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowboy/2.0/manual/cowboy_rest/</loc>
</url>
@@ -383,11 +427,11 @@
</url>
<url>
- <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/escripts/</loc>
+ <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/sfx/</loc>
</url>
<url>
- <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/compat/</loc>
+ <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/escripts/</loc>
</url>
<url>
@@ -395,7 +439,7 @@
</url>
<url>
- <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/asciidoc/</loc>
+ <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/compat/</loc>
</url>
<url>
@@ -403,7 +447,7 @@
</url>
<url>
- <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/edoc/</loc>
+ <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/asciidoc/</loc>
</url>
<url>
@@ -411,11 +455,11 @@
</url>
<url>
- <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/shell/</loc>
+ <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/edoc/</loc>
</url>
<url>
- <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/eunit/</loc>
+ <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/shell/</loc>
</url>
<url>
@@ -423,6 +467,10 @@
</url>
<url>
+ <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/eunit/</loc>
+ </url>
+
+ <url>
<loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/req_body/</loc>
</url>
@@ -435,19 +483,19 @@
</url>
<url>
- <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/coverage/</loc>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/cookies/</loc>
</url>
<url>
- <loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/cookies/</loc>
+ <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/coverage/</loc>
</url>
<url>
- <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/ci/</loc>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/multipart/</loc>
</url>
<url>
- <loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/multipart/</loc>
+ <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/ci/</loc>
</url>
<url>
@@ -463,19 +511,19 @@
</url>
<url>
- <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins/</loc>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/rest_handlers/</loc>
</url>
<url>
- <loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/rest_handlers/</loc>
+ <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins/</loc>
</url>
<url>
- <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins_list/</loc>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/rest_flowcharts/</loc>
</url>
<url>
- <loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/rest_flowcharts/</loc>
+ <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/external_plugins_list/</loc>
</url>
<url>
@@ -487,11 +535,11 @@
</url>
<url>
- <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/history/</loc>
+ <loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/ws_protocol/</loc>
</url>
<url>
- <loc>https://ninenines.eu/docs/en/cowboy/2.0/guide/ws_protocol/</loc>
+ <loc>https://ninenines.eu/docs/en/erlang.mk/1/guide/history/</loc>
</url>
<url>