From e5c6ca9243fa213aa2a0b0d1395c7384549a06c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?=
Date: Mon, 26 Jun 2017 13:11:05 +0200
Subject: Update docs
---
docs/en/cowboy/2.0/guide/multipart.asciidoc | 2 +-
docs/en/cowboy/2.0/guide/multipart/index.html | 2 +-
docs/en/cowboy/2.0/guide/routing.asciidoc | 3 ++-
docs/en/cowboy/2.0/guide/routing/index.html | 3 ++-
docs/en/cowboy/2.0/manual/cowboy_req.read_part/index.html | 4 ++--
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 -->
{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/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:
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
-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/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 -->
-> {ok, Headers, Req} | {done, Req}
Opts :: cowboy_req:read_body_opts()
-Headers :: cow_multipart:headers()
+Headers :: #{binary() => binary()}
Read the next part of a multipart body.
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.
Return value
An ok
tuple is returned containing the next part’s headers
-as a list of key/values.
+as a map.
A done
tuple is returned if there are no more parts to read.
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.
--
cgit v1.2.3