summaryrefslogtreecommitdiffstats
path: root/docs/en
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-06-26 13:11:05 +0200
committerLoïc Hoguin <[email protected]>2017-06-26 13:11:05 +0200
commite5c6ca9243fa213aa2a0b0d1395c7384549a06c9 (patch)
tree112a1b444fac4e2b0f4de59b435458ad0c14abc5 /docs/en
parentf3ab9ef65d948469e864184bcf95114bf8025ad1 (diff)
downloadninenines.eu-e5c6ca9243fa213aa2a0b0d1395c7384549a06c9.tar.gz
ninenines.eu-e5c6ca9243fa213aa2a0b0d1395c7384549a06c9.tar.bz2
ninenines.eu-e5c6ca9243fa213aa2a0b0d1395c7384549a06c9.zip
Update docs
Diffstat (limited to 'docs/en')
-rw-r--r--docs/en/cowboy/2.0/guide/multipart.asciidoc2
-rw-r--r--docs/en/cowboy/2.0/guide/multipart/index.html2
-rw-r--r--docs/en/cowboy/2.0/guide/routing.asciidoc3
-rw-r--r--docs/en/cowboy/2.0/guide/routing/index.html3
-rw-r--r--docs/en/cowboy/2.0/manual/cowboy_req.read_part/index.html4
5 files changed, 8 insertions, 6 deletions
diff --git a/docs/en/cowboy/2.0/guide/multipart.asciidoc b/docs/en/cowboy/2.0/guide/multipart.asciidoc
index 77d263a7..756d3b46 100644
--- a/docs/en/cowboy/2.0/guide/multipart.asciidoc
+++ b/docs/en/cowboy/2.0/guide/multipart.asciidoc
@@ -102,7 +102,7 @@ multipart(Req0) ->
{data, _FieldName} ->
{ok, _Body, Req2} = cowboy_req:read_part_body(Req1),
Req2;
- {file, _FieldName, _Filename, _CType, _CTransferEncoding} ->
+ {file, _FieldName, _Filename, _CType} ->
stream_file(Req1)
end,
multipart(Req);
diff --git a/docs/en/cowboy/2.0/guide/multipart/index.html b/docs/en/cowboy/2.0/guide/multipart/index.html
index a87ba158..cc53b55d 100644
--- a/docs/en/cowboy/2.0/guide/multipart/index.html
+++ b/docs/en/cowboy/2.0/guide/multipart/index.html
@@ -164,7 +164,7 @@ http://www.gnu.org/software/src-highlite -->
{<span style="color: #FF6600">data</span>, <span style="color: #009900">_FieldName</span>} <span style="color: #990000">-&gt;</span>
{<span style="color: #FF6600">ok</span>, <span style="color: #009900">_Body</span>, <span style="color: #009900">Req2</span>} <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_part_body</span></span>(<span style="color: #009900">Req1</span>),
<span style="color: #009900">Req2</span>;
- {<span style="color: #FF6600">file</span>, <span style="color: #009900">_FieldName</span>, <span style="color: #009900">_Filename</span>, <span style="color: #009900">_CType</span>, <span style="color: #009900">_CTransferEncoding</span>} <span style="color: #990000">-&gt;</span>
+ {<span style="color: #FF6600">file</span>, <span style="color: #009900">_FieldName</span>, <span style="color: #009900">_Filename</span>, <span style="color: #009900">_CType</span>} <span style="color: #990000">-&gt;</span>
<span style="font-weight: bold"><span style="color: #000000">stream_file</span></span>(<span style="color: #009900">Req1</span>)
<span style="font-weight: bold"><span style="color: #0000FF">end</span></span>,
<span style="font-weight: bold"><span style="color: #000000">multipart</span></span>(<span style="color: #009900">Req</span>);
diff --git a/docs/en/cowboy/2.0/guide/routing.asciidoc b/docs/en/cowboy/2.0/guide/routing.asciidoc
index 2d8a1f27..47ef3c57 100644
--- a/docs/en/cowboy/2.0/guide/routing.asciidoc
+++ b/docs/en/cowboy/2.0/guide/routing.asciidoc
@@ -216,6 +216,7 @@ list used by routing. This will apply to all new connections accepted
by the listener:
[source,erlang]
-cowboy:set_env(my_http_listener, dispatch, cowboy_router:compile(Dispatch)).
+Dispatch = cowboy_router:compile(Routes),
+cowboy:set_env(my_http_listener, dispatch, Dispatch).
Note that you need to compile the routes again before updating.
diff --git a/docs/en/cowboy/2.0/guide/routing/index.html b/docs/en/cowboy/2.0/guide/routing/index.html
index 2cfe01b7..f67532cd 100644
--- a/docs/en/cowboy/2.0/guide/routing/index.html
+++ b/docs/en/cowboy/2.0/guide/routing/index.html
@@ -317,7 +317,8 @@ by the listener:</p></div>
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">cowboy:set_env</span></span>(<span style="color: #FF6600">my_http_listener</span>, <span style="color: #FF6600">dispatch</span>, <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>(<span style="color: #009900">Dispatch</span>))<span style="color: #990000">.</span></tt></pre></div></div>
+<pre><tt><span style="color: #009900">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>(<span style="color: #009900">Routes</span>),
+<span style="font-weight: bold"><span style="color: #000000">cowboy:set_env</span></span>(<span style="color: #FF6600">my_http_listener</span>, <span style="color: #FF6600">dispatch</span>, <span style="color: #009900">Dispatch</span>)<span style="color: #990000">.</span></tt></pre></div></div>
<div class="paragraph"><p>Note that you need to compile the routes again before updating.</p></div>
</div>
</div>
diff --git a/docs/en/cowboy/2.0/manual/cowboy_req.read_part/index.html b/docs/en/cowboy/2.0/manual/cowboy_req.read_part/index.html
index d97c2866..29f18993 100644
--- a/docs/en/cowboy/2.0/manual/cowboy_req.read_part/index.html
+++ b/docs/en/cowboy/2.0/manual/cowboy_req.read_part/index.html
@@ -88,7 +88,7 @@ http://www.gnu.org/software/src-highlite -->
<span style="color: #990000">-&gt;</span> {<span style="color: #FF6600">ok</span>, <span style="color: #009900">Headers</span>, <span style="color: #009900">Req</span>} | {<span style="color: #FF6600">done</span>, <span style="color: #009900">Req</span>}
<span style="color: #009900">Opts</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_req:read_body_opts</span></span>()
-<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> <span style="font-weight: bold"><span style="color: #000000">cow_multipart:headers</span></span>()</tt></pre></div></div>
+<span style="color: #009900">Headers</span> <span style="color: #990000">::</span> #{<span style="font-weight: bold"><span style="color: #000080">binary</span></span>() <span style="color: #990000">=&gt;</span> <span style="font-weight: bold"><span style="color: #000080">binary</span></span>()}</tt></pre></div></div>
<div class="paragraph"><p>Read the next part of a multipart body.</p></div>
<div class="paragraph"><p>This function reads the request body and parses it as
multipart. Each parts of a multipart representation have
@@ -145,7 +145,7 @@ to 5 seconds.</p></div>
<h2 id="_return_value">Return value</h2>
<div class="sectionbody">
<div class="paragraph"><p>An <code>ok</code> tuple is returned containing the next part&#8217;s headers
-as a list of key/values.</p></div>
+as a map.</p></div>
<div class="paragraph"><p>A <code>done</code> tuple is returned if there are no more parts to read.</p></div>
<div class="paragraph"><p>The Req object returned in the tuple must be used for that point
onward. It contains a more up to date representation of the request.